git clone
- 發生錯誤
RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
- 原因: 剛新換電腦,電腦已經存在他人的ssh,但是git配置的賬號密碼已經改成自己的嗎,這樣ssh和用戶不一致
- 解決辦法:配置自己的ssh替換原來用戶的
- 步驟:
- 檢查是否已經有SSH Key:
cd ~/.ssh
- 生成SSH
Keyssh-keygen -t rsa -C "youremail"
第一次生成的話,直接一路回車,不需要輸入密碼。不是第一次生成的話,會提示 overwrite (y/n)? 問你是否覆蓋舊的 SSH Key ,直接填 y ,然後一直回車就行了,最後得到了兩個文件:id_rsa和id_rsa.pub。
記事本打開/C/Users/Administrator/.ssh/下id_rsa.pub文件,複製該段信息;登錄github賬戶,點擊頭像進入Settings -> SSH and GPG keys -> New SSH key,將複製的信息粘貼到該處。
- 測試是否成功
ssh -T [email protected]
提示“Hi xxx! You’ve successfully authenticated, but GitHub does not provide shell access.”說明添加成功。
本機操作:
The authenticity of host 'github.com (13.250.177.223)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,13.250.177.223' (RSA) to the list of known hosts.
Hi caoyanyuan! You've successfully authenticated, but GitHub does not provide shell access.