当前位置:   article > 正文

[git]报错fatal: ‘origin‘ does not appear to be a git repository Could not read from remote repository_fatal: 'origin' does not appear to be a git reposi

fatal: 'origin' does not appear to be a git repository fatal: could not read

问题1:

 

fatal: 'origin' does not appear to be a git repository

fatal: Could not read from remote repository.

说明库是有的,但是没办法push。所以重新关联一下。

解决方法:

输入以下代码,这是因为本地的分支没有和远程分支建立联系,需要执行以下代码就可以正常push

git push --set-upstream origin master

 

问题2:

 

fatal: 'git@github.com/xxx/xx.git' does not appear to be a git reposory

fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

解决方法:

1.检查remote内容

git remote -v      

 

2.删除远程的origin

git remote rm origin

3.检查是否完全删除

git remote -v

4.空了之后重新建立

git remote add origin git@github.com:你的gihub名字/你的仓库名.git

5.检查remote内容

git remote -v

6.最后重新push

git push -u origin master

完成啦!!!!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/963611
推荐阅读
相关标签
  

闽ICP备14008679号