手机看片精品高清国产日韩,色先锋资源综合网,国产哺乳奶水91在线播放,乱伦小说亚洲色图欧洲电影

Git Pull/Git Push配置SSH代理

2024-08-27 14:28:04 4791

Git Pull&Git Push配置SSH代理

藍隊云小課堂:


當(dāng)git pull或push時經(jīng)常會遇到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代理來保障網(wǎng)絡(luò)通暢,添加~/.ssh/config文件,配置如下內(nèi)容

# cat ~/.ssh/config

Host github.com

    User git

    Hostname github.com

    Port 22

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

ProxyCommand依賴nc,服務(wù)器上需要提前安裝nc

# apt-get install ncat


更多小知識,可聯(lián)系藍隊云一起探討。


提交成功!非常感謝您的反饋,我們會繼續(xù)努力做到更好!

這條文檔是否有幫助解決問題?

非常抱歉未能幫助到您。為了給您提供更好的服務(wù),我們很需要您進一步的反饋信息:

在文檔使用中是否遇到以下問題: