问题
由于公司访问GitHub,所以只能去代理,但是内部网gitlab服务不能去代理。 因此,希望找到git可以根据项目地址自动使用不同代理的方案。
方案
可以通过指定GitHub地址来使用指定的代理服务器,如下所示git config----全球HTP.https://Github.com .代理套接字53360//127.0.0.133601081
git config--全球http.https://Github.com.SSLVerifyfalse
git config----全球HTTPS.https://Github.com .代理套接字53360//127.0.0.133601081
gitconfig全球https.https://github.com.sslverifyfalse在. gitconfig文件中配置如下:
[http 'https://github.com']
代理=套接字5://127.0.0.1:1081
sl验证=假
[https 'https://github.com']
代理=套接字5://127.0.0.1:1081
sslVerify=false