MacOS遇到 Could not resolve proxy: “localhost:1080“如何解决

背景:

今天想更新Homebrew,但是发现提示
fatal: unable to access ‘https://mirrors.ustc.edu.cn/brew.git/’: Could not resolve proxy: “localhost”。如下图所示:
在这里插入图片描述

解决方案:

问题排查发现是因为之前嫌git下载慢,设置了代理。只要把设置的localhost:1080的代理取消就行了。

执行下列脚本查看设置的代理。

git config --global http.proxy

执行下列脚本关闭代理。

git config --global --unset http.proxy

猜你喜欢

转载自blog.csdn.net/m0_38068876/article/details/115109221