我的公司网络使用 PAC 脚本。(http://proxyconf.xxx.yy-ss/proxy.pac http://proxyconf.xxx.yy-ss/proxy.pac).
在“git config”命令中使用 PAC 脚本不起作用。
“git config --global http.proxyhttp://proxyconf.xxx.yy-ss/proxy.pac http://proxyconf.xxx.yy-ss/proxy.pac"
我通过下载 proxy.pac 脚本(100 个奇怪的条目)、选择最通用的(通常是最底部的)代理并在“git config --global http.proxy”命令中将其与我的凭据一起使用来使其工作。
我已经询问过如何让 git 通过代理服务器工作:
让 git 与代理服务器一起工作 https://stackoverflow.com/questions/783811/getting-git-to-work-with-a-proxy-server
如何通过 HTTP 代理从 Git 存储库中提取内容? https://stackoverflow.com/questions/128035/how-do-i-pull-from-a-git-repository-through-an-http-proxy
但上述问题没有提及 PAC 脚本。
是否有一些设置可以直接使用 proxy.pac 脚本?
您需要配置 git 并使其引用您自己的代理服务器,其中一个使用您的 PAC 文件。
参见例如liangqing/PacProxy https://github.com/liangqing/PacProxy
一个socks代理服务器,使用PAC文件来决定如何转发请求
Features
- 实现一个socks服务器(支持socks4和socks5,无认证模块)
- 使用PAC文件来决定如何转发请求
正如《使用socks代理和git进行http传输 https://stackoverflow.com/a/16756248/6309",你需要将 git 配置为:
git config --global http.proxy 'socks5://127.0.0.1:9999'
无需配置https.proxy
: .
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)