首页 > 技术文章 > Git代理设置:Cocoapods - fatal: 无法访问,Connection refused

strengthen 2022-02-12 17:36 原文

热烈欢迎,请直接点击!!!

进入博主App Store主页,下载使用各个作品!!!

注:博主将坚持每月上线一个新app!!

1、根据代理软件的具体端口,设置全局代理。
//sock5代理
git config --global http.proxy 'socks5://127.0.0.1:7890'
git config --global https.proxy 'socks5://127.0.0.1:7890'
//http
git config --global http.proxy http://127.0.0.1:7890
//https
git config --global https.proxy https://127.0.0.1:7890

2、删除全局代理。

git config --global --unset http.proxy
git config --global --unset https.proxy

3、查看已有代理配置。

git config --global -l

 

推荐阅读