解決packet_write_wait: Connection to...: Broken pipe

問題

打算從遠程倉庫克隆項目到本地時,報錯:git

$ git clone git@github.com:EverChan6/meetingDemo.git
Cloning into 'meetingDemo'...
packet_write_wait: Connection to 52.74.223.119 port 22: Broken pipe // <==就是它!!!
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.github

解決

1. 從網上看了挺多解決辦法,終於找到一個說辭是說
因爲多日未 進行ssh 登陸操做,本地 publickey 失效形成的。

因此解決方法就是Adding your SSH key to the ssh-agentbash

$ ssh-add ~/.ssh/id_rsa
Identity added: /c/Users/HP/.ssh/id_rsa (/c/Users/HP/.ssh/id_rsa)
2. 若是執行上面的命令出現以下錯誤
Could not open a connection to your authentication agent.

則先執行如下命令ssh

$ ssh-agent bash
相關文章
相關標籤/搜索