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

问题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:

[git]报错fatal: ‘origin‘ does not appear to be a git repository Could not read from remote repository_第1张图片

 

fatal: '[email protected]/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 [email protected]:你的gihub名字/你的仓库名.git

5.检查remote内容

git remote -v

6.最后重新push

git push -u origin master

完成啦!!!!

你可能感兴趣的:(git,github)