连接远程库
Topic source当我准备推送的时候就出现了以下信息
git push -u origin master
ERROR: Repository not found. fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
查询了好多方法后无法解决,经过这里的提示,把origin 改为 o ,之后输入 就提示成功了,然后github 官网上,也有了我learngit文件夹里面的 LTCENSE.txt 和 readme.txt 这两个文件,应该是成功了,但是不知道为何。
对的,我出现的 $ git push -u origin master ERROR: Repository not found. fatal: Could not read from remote repository.
我确定本地和github上的版本库是存在的,并且版本库名称是一致的,试了网上的其他办法都不能解决,看到这位仁兄的解决办法 ,让我想到我之前可能在bash上设置过远程库remote,所以我也把remote改成了其他的名字
$ git remote add o git@github.com:account name/repository name.git $ git push -u o master
然后就成功提交了代码
我在windows下没遇到这个问题。在Linux下遇到了。按照上面朋友的建议修改为‘o’的确有用。但感觉这样不正常。于是尝试将github上的ssh key删除重新拷贝添加,后面就正常了~~
- 1
馪菓
$ git remote add origin git@github.com:Jaris/learngit.git $ git push -u origin master Warning: Permanently added the RSA host key for IP address '192.30.255.112' to the list of known hosts. ERROR: Repository not found. fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
但我将origin改名为o,则成功了,这是为啥? $ git remote add o git@github.com:Jaris/learngit.git $ git push -u o master Username for 'https://github.com': jarisma@foxmail.com Counting objects: 9, done. Delta compression using up to 2 threads. Compressing objects: 100% (6/6), done. Writing objects: 100% (9/9), 771 bytes | 85.00 KiB/s, done. Total 9 (delta 1), reused 0 (delta 0) remote: Resolving deltas: 100% (1/1), done. To https://github.com/Jairs/learngit.git