問題:下載時候提示curl: (7) Failed to connect to github.com port 443 after 6 ms: Connection refused
哀蘑,這是因為我是通過代理服務(wù)器訪問網(wǎng)絡(luò)的
lixiaohui@mac ~:brew install --cask countdown
==> Downloading https://github.com/soffes/Countdown/releases/download/v0.1.0/Cou
curl: (7) Failed to connect to github.com port 443 after 6 ms: Connection refused
解決方法:
1侦讨、設(shè)置git的代理
git config --global http.proxy http://127.0.0.1:8080
git config --global https.proxy https://127.0.0.1:8080
http://127.0.0.1:8080
是我本地的代理服務(wù)器和服務(wù)器端口
2、設(shè)置mac系統(tǒng)的代理,打開本地的~/.zprofile
文件禽绪,添加用戶級環(huán)境變量
vim ~/.zprofile
# 粘貼下面兩行到文件中
export HTTPS_PROXY=http://127.0.0.1:8080
export HTTP_PROXY=http://127.0.0.1:8080
# 保存后退出
# 執(zhí)行使其生效
source ~/.zprofile
即可解決涎永,如下
lixiaohui@mac ~:brew install --cask countdown
==> Downloading https://github.com/soffes/Countdown/releases/download/v0.1.0/Cou
==> Downloading from https://objects.githubusercontent.com/github-production-rel
######################################################################## 100.0%
==> Installing Cask countdown
==> Moving Screen Saver 'Countdown.saver' to '/Users/lixiaohui/Library/Screen Sa
?? countdown was successfully installed!