国产欧美日韩第一页|日本一二三不卡视频|在线精品小视频,亚洲第一免费播放区,metcn人体亚洲一区,亚洲精品午夜视频

Git Pull/Git Push配置SSH代理

2024-08-27 14:28:04 463

Git Pull&Git Push配置SSH代理

藍(lán)隊(duì)云小課堂:


當(dāng)git pull或push時(shí)經(jīng)常會(huì)遇到Could not read from remote repository的報(bào)錯(cuò),尤其是在啟用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.

此時(shí)我們可以通過(guò)配置SSH代理來(lái)保障網(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


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


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

這條文檔是否有幫助解決問(wèn)題?

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

在文檔使用中是否遇到以下問(wèn)題: