github.com,作为程序员的代码仓库,我们经常会用到。但有时候我们不能直接通过网络链接它,只能通过代理。
这里我有一台代理服务器,起初我以为在终端设置了代理环境就行了,其设置为在你的~/.bashrc里增加以下几行:
export http_proxy="http://proxy-server:3128/"
export https_proxy="http://proxy-server:3128/"
export ftp_proxy="http://proxy-server:3128/"
设置好以后,使用以下命令使其启动
source ~/.bashrc
然后测试wget是没有问题的,如下:
但使用git clone就不行
git clone git@github.com:aborn/ulitcs.git
通过这两篇文章知道了原因: