问题:[ Git ] 远程仓库连接问题
场景: 项目上传至GitHub时出现报错:
fatal: ‘origin’ does not appear to be a git repository
fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
-致命:“origin”似乎不是Git存储库
-致命:无法从远程存储库中读取。请确保您具有正确的访问权限,并且存储库存在
分析:
-
检查仓库地址: 输入 git remote -v --> 为空
-
检查分支: 输入 git branch -->*master 只有一个
-
以上代表和远程仓库可能已断开联系
解决:
-
重新添加连接
git remote add origin ssh://<远程SSH地址>
-
重新输入检查指令
git remote -v
出现:
origin git://github.com/schacon/ticgit.git (fetch)
origin git://github.com/schacon/ticgit.git (push)
问题解决
如果我的博客对你的问题有帮助,欢迎互相交流,欢迎留言留个爪~(~ ̄▽ ̄)~