亚洲国产第一_开心网五月色综合亚洲_日本一级特黄特色大片免费观看_久久久久久久久久免观看

Hello! 歡迎來到小浪云!


云服務器Git Pull/Git Push配置SSH代理


avatar
小浪云 2024-10-09 272


git pull或push時經常會遇到Could not read from remote repository的報錯,尤其是在啟用Clash等代理軟件后

git push

kex_exchange_identification: Connection closed by remote host

Connection closed by 20.205.243.166 port 22

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

此時我們可以通過配置ssh代理來保障網絡通暢,添加~/.ssh/config文件,配置如下內容

# cat ~/.ssh/config

Host github.com

    User git

    Hostname github.com

    Port 22

    ProxyCommand nc -v -x localhost:7890 %h %p

ProxyCommand依賴nc,服務器上需要提前安裝nc

# apt-get install ncat

相關閱讀