gpt4 book ai didi

来自 Yocto 的 Poky 的 Git 克隆错误

转载 作者:太空狗 更新时间:2023-10-29 14:17:09 26 4
gpt4 key购买 nike

我的公司使用代理脚本访问互联网。我的主机是 Windows,我使用 VirtualBox 运行 Ubuntu 14.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 吗?

我该如何解决这个问题。

最佳答案

您的公司可能使用 NTLM 身份验证,该身份验证在 ~/.bashrc 的导出中不受协议(protocol)支持。

您需要本地主机上的另一个代理来进行您的身份验证。

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"

关于来自 Yocto 的 Poky 的 Git 克隆错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45979920/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com