我的公司使用代理脚本访问互联网。我的主机是Windows,我使用VirtualBox来运行Ubuntu14.04。我想使用GIT从yocto下载一个poky文件,使用代码:
git clone git://git.yoctoproject.org/poky我使用了这个链接:Working Behind a Network Proxy,并为Firefox和apt设置了代理。我得到的错误如下:
git clone git://git.yoctoproject.org/poky
Cloning into 'poky'...
2017/08/31 11:42:40 socat[4846] E read(): EOF during read of socks reply, peer might not be a socks4 server
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.在我的~/.bashrc中,我添加了如下代理:
export http_proxy='*http://usrname:password@myproxy.mycompany.de:8080/wpad.dat*'
export ALL_PROXY='socks://usrname:password@myproxy.mycompany.de:8080/wpad.dat'
export GIT_PROXY_COMMAND="oe-git-proxy"
export NO_PROXY=$no_proxy我应该使用另一种方式来设置我的密码和用户名吗?我是否应该在ALL_PROXY导出中使用http而不是socks?
我该如何解决这个问题呢?
发布于 2017-09-01 16:37:02
您的公司可能使用~/.bashrc导出中的协议不支持的NTLM身份验证。
您需要在localhost上使用另一个代理来进行身份验证。
https://sourceforge.net/projects/cntlm/files/cntlm/cntlm%200.92.3/
CNTLM可以做到这一点。使用以下命令安装cntlm_0.92.3_amd64.deb
sudo dpkg -i cntlm_0.92.3_amd64.deb在文件/etc/cntlm.conf中配置设置
Username <username>
Domain <domain>
Password <password>
Proxy <company-proxy>
Listen 3128 # should be default
NoProxy localhost, 127.0.0.*, 10.*, 192.168.* # should be default然后使用sudo service cntlm restart重启CNTLM服务。
作为代理的环境变量,您现在需要:http://127.0.0.1:3128
export http_proxy="http://127.0.0.1:3128"https://stackoverflow.com/questions/45979920
复制相似问题