1. 程式人生 > >gitclone 報錯埠連結不上

gitclone 報錯埠連結不上

從github上下載YouCompleteMe,結果報埠連結不上

$ git clone --recursive https://github.com/Valloric/YouCompleteMe.git
正克隆到 'YouCompleteMe'...
fatal: unable to access 'https://github.com/Valloric/YouCompleteMe.git/': Failed to connect to 127.0.0.1 port 45523: Connection refused

此時,可以檢測試下,是不是電腦端的 45523的埠被佔用了。

env | grep -i proxy

$ env | grep -i proxy
NO_PROXY=localhost,127.0.0.0/8,::1
http_proxy=http://127.0.0.1:45523/
https_proxy=http://127.0.0.1:45523/
HTTPS_PROXY=http://127.0.0.1:45523/
no_proxy=localhost,127.0.0.0/8,::1
HTTP_PROXY=http://127.0.0.1:45523/

要取消該設定: unset http_proxy unset https_proxy

要配置該埠設定:

export http_proxy=127.0.0.1:45523

export https_proxy=127.0.0.1:45523