1、問題場景:
使用tortoiseGit工具pull代碼的時候報錯
git.exe pull --progress -v --no-rebase "origin"
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
無法從存儲庫中讀取,可能是因爲權限問題。
由於tortoisegit使用的是putty的.ppk格式的密鑰,而gitlab必須使用rsa密鑰,因此使用其自帶的工具,在開始菜單裏找到tortoisegit,選擇他的puttygen工具來生成密鑰
2、解決方式
點擊開始菜單,按照圖示操作
點擊generate,此時會開始生成密鑰,時間比較長
成功之後,點擊 sava private key,save鍵把私鑰保存爲.ppk格式,選擇一個目錄保存test.ppk
然後,開始菜單,找到pageant
'
點擊add key,選擇剛纔保存的test.ppk,添加成功。
鼠標右鍵,選擇TortoiseGit——>setting。signiing key選擇上一步保存的文件。
最後一步,修改ssh。