Git出现 fatal: ‘origin‘ does not appear to be a git repository fatal: Could not read from remote的解决方法

目录

  • 1. 问题所示
  • 2. 原理分析
  • 3. 解决方法
    • 3.1 断开连接
    • 3.2 连接错误

1. 问题所示

刚开始学习git或者步入公司的时候对git的一些基本操作或者错误还不会处理

可能会出现如下问题:

 git push origin master
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.

截图如下:
Git出现 fatal: ‘origin‘ does not appear to be a git repository fatal: Could not read from remote的解决方法_第1张图片

2. 原理分析

git add 以及commit命令都可,就是push上传的时候出现了问题
主要原因是链接不上,本地分支和远程分支断开连接
所以重新链接即可

可熟悉如下命令,进一步排查

  • git branch -v ,查看是分有分支,甚至是否已经断开链接
  • git r

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