git@github.com:Permission denied(publickey).fatal: Could not read form remote repository错误
生活随笔
收集整理的這篇文章主要介紹了
git@github.com:Permission denied(publickey).fatal: Could not read form remote repository错误
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
文章目錄
- 前言
- 問題分析
- 解決方法
- 配置客戶端
- 配置服務端
- 驗證
前言
在使用goland從github下載依賴時(git clone github.com/gin-gonic/gin)出現git@github.com:Permission denied(publickey).fatal: Could not read form remote repository錯誤。
問題分析
Permission denied(publickey):沒有權限
說明github和本地git沒有生成ssh key或者ssh key不匹配
解決方法
配置客戶端
然后一路回車(不用輸入)。
出現下方文字No more authentication methods to try. Permission denied(publickey) 如圖:
出現Could not open a connection to your authentication agent警告
在git bash執行ssh-agent bash命令,然后再次執行ssh-add ~/.ssh/id_rsa
Identity added: /c/Users/zhandongyang/.ssh/id_rsa,這是ssh key文件在windows電腦上的位置,用記事本打開這個路徑上的id_rsa.pub文件,復制里面的內容。
配置服務端
Title寫個自己記得住的名字,Key填寫復制的id_rsa.pub文件內容
驗證
在客戶端(本文為windows10電腦)的git bash執行ssh -T git@github.com
至此結束。
總結
以上是生活随笔為你收集整理的git@github.com:Permission denied(publickey).fatal: Could not read form remote repository错误的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: android surfaceview
- 下一篇: 字符串转内存c语言,【一起学C】C语言面