在CentOS 6.5上安装GitLab:卷曲错误

时间:2016-06-27 09:32:07

标签: 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命令,但仍然出现相同的错误。 非常感谢任何帮助!

1 个答案:

答案 0 :(得分:0)

我在CentOS上安装GitLab时面临两个问题:

1)代理问题:错误消息显示为:

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

所以我设置了https代理,如下所示

export https_proxy=username:password@proxy:port

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

谢谢!