我是 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/