curl - 在 CentOS 6.5 上安装 GitLab : Curl error

标签 curl centos gitlab

我是 GitLab 和 CentOS 的新手。 我正在尝试使用以下官方链接在 CentOS 6.5 上安装 GitLab: https://about.gitlab.com/downloads/#centos6

执行以下步骤时:

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

我收到以下错误:

Detected operating system as centos/6.
Checking for curl...
Detected curl...
Downloading repository file: https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/config_file.repo?os=centos&dist=6&source=script
curl: (6) Couldn't resolve host 'packages.gitlab.com'

Unable to run:
    curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/config_file.repo?os=centos&dist=6&source=script

Double check your curl installation and try again. 

我也试过使用代理设置的 curl 命令,仍然遇到同样的错误。 非常感谢任何帮助!

最佳答案

我在 CentOS 上安装 GitLab 时遇到了两个问题:

1) 代理问题:错误信息如下:

Couldn't resolve host 'packages.gitlab.com'

所以我如下设置https代理

export https_proxy=username:password@proxy:port

2) root 权限问题:由于我是通过非 root 用户安装 GitLab,而 GitLab 是在 root 用户拥有的/etc/repos.d 下安装软件包,因此安装失败.因此,我通过 root 登录并安装了它。

谢谢!

关于curl - 在 CentOS 6.5 上安装 GitLab : Curl error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38050400/

相关文章:

linux - 同一网络中的 Docker 容器无法相互通信

nginx - 为什么 Nginx 会从默认目录而不是新目录正确地提供文件?

php - 尝试使用 PHP 和 cURL 登录站点?

linux - 从本地仓库安装 postgresql——为什么无法从仓库下载?

node.js - nodejs https#request 在相同的 curl 请求成功的地方失败

Git merge 比较 from 到 含义

Git 镜像问题

git - 使用开放的 LDAP 配置 GitLab

node.js - 从nodejs中的请求模块调用时,github搜索api没有给出结果

PHP curl 和 HTTPS