1

我在 Github Enterprise 中有一个存储库,我已经在我的机器上使用它并且一切正常,我能够克隆、推送、拉取等......

现在我正在尝试在安装了 Ubuntu 的虚拟机中使用相同的存储库,该虚拟机使用代理连接到互联网。但是当我尝试克隆时,我收到以下消息。

$ git clone https://cto-github.cisco.com/GDC-Interns-DevTeam/GDC-Dev-Back-End.git
Cloning into 'GDC-Dev-Back-End'...
fatal: unable to access 'https://cto-github.cisco.com/GDC-Interns-DevTeam/GDC-Dev-Back-End.git/': Received HTTP code 504 from proxy after CONNECT

我已经使用以下几行在文件 /etc/profile 中配置了代理

export http_proxy=http://my_user:my_pass@xx.xx.xx.xx:yyyy/
export https_proxy=https://my_user:my_pass@xx.xx.xx.xx:yyyy/

我通过从其他存储库克隆并向公共页面发出一些请求来测试代理工作

wget https://en.wikipedia.org/wiki/Main_Page
curl https://en.wikipedia.org/wiki/Main_Page

我仍然收到消息,所以我尝试使用以下命令在 git 中配置代理

git config --global https.proxy https://my_user:my_pass@xx.xx.xx.xx:yyyy/
git config --global http.proxy http://my_user:my_pass@xx.xx.xx.xx:yyyy/

作为最后的手段,我尝试禁用代理(因为我认为它可能是实习生企业资源,所以它与代理冲突)但是像这样我无法解析主机

$ git clone https://cto-github.cisco.com/GDC-Interns-DevTeam/GDC-Dev-Back-End.git
Cloning into 'GDC-Dev-Back-End'...
fatal: unable to access 'https://cto-github.cisco.com/GDC-Interns-DevTeam/GDC-Dev-Back-End.git/': Could not resolve host: cto-github.cisco.com

最后,我还注意到日志消息有一个斜杠 (/),因此我尝试将存储库的名称放在引号 ("") 之间,但我无法从日志中删除斜杠。

$ git clone "https://cto-github.cisco.com/GDC-Interns-DevTeam/GDC-Dev-Back-End.git"
Cloning into 'GDC-Dev-Back-End'...
fatal: unable to access 'https://cto-github.cisco.com/GDC-Interns-DevTeam/GDC-Dev-Back-End.git/': Received HTTP code 504 from proxy after CONNECT

对我可以尝试的其他事情有什么想法吗?

提前感谢您的帮助

4

0 回答 0