使用TortoiseGit拉取失敗git.exe pull --progress -v --no-rebase "origin"的解決辦法
很多人在window使用Git版本控制的時候會用到TortoiseGit的時候會遇到拉取失敗,報錯如下
git.exe pull --progress -v --no-rebase "origin" /usr/bin/bash: git@gitee.com: No such file or directory fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. git 未能順利結束 (退出碼 1) (514 ms @ 2020/7/28 22:25:54)
網上很多“終極教程”最優解決方案是使用Git clone命令把遠程庫克隆到本地后才能解決,其實這不是最優的解決方案。
遇到這個問題是因為在配置遠程庫地址的時候將鏈接配置成了SSH鏈接,而windows系統默認是不支持SSH鏈接方式的,如果是git命令行環境下是沒有問題的。
最簡單的解決方法就是把遠程庫url改成https鏈接就可以了,如下圖所示:
修改完鏈接應用,確定,再拉取就可以完美解決。
注:SSH鏈接一般形式為git@gitee.com:shisou/shisou.git
https鏈接一般形式為https://gitee.com/shisou/shisou.git
下一篇
vscode常用快捷鍵大全