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.csdn.net/weixin_41010198/article/details/87929622
[2] 替換及重置Homebrew默認源 https://lug.ustc.edu.cn/wiki/mirrors/help/brew.git
[3] Homebrew切換爲國內鏡像源 https://blog.csdn.net/u013310075/article/details/103832893

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章