unable to access 'https://github.com/Homebrew/brew/': Failed to connect to 127.0.0.1 port 1087

在这里插入图片描述
期间查了好多资料,包括取消系统代理,更改mac的host这种,
最终发现问题是很久以前设置过git的的全局代理…

所以取消git的全局代理就ok啦…

取消代理:
git config --global --unset http.proxy
git config --global --unset https.proxy

记录一下git的代理命令:
查看代理:
git config --global --get http.proxy
git config --global --get https.proxy

设置代理:
git config --global http.proxy ‘socks5://127.0.0.1:1080’
git config --global https.proxy ‘socks5://127.0.0.1:1080’

当然最好的方式就是把homebrew设置为国内的中科大源:

参考:
[1] 解决git下载出现:Failed to connect to 127.0.0.1 port 1080: Connection refused拒绝连接错误 https://blog.youkuaiyun.com/weixin_41010198/article/details/87929622
[2] 替换及重置Homebrew默认源 https://lug.ustc.edu.cn/wiki/mirrors/help/brew.git
[3] Homebrew切换为国内镜像源 https://blog.youkuaiyun.com/u013310075/article/details/103832893

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值