[英]Permission denied to remote repo. Could not read from repote repository
经常出现此错误,但通常的方法无法解决此问题: GIT push:权限被拒绝(公共密钥) 。
此修复程序对我没有帮助。 我能够做到:
ssh -T git@github.com
...完全没有问题。
git remote -v
...还会以SSH模式返回正确的URL。
这是我第三次尝试链接到GitHub页面,所以我不确定为什么现在才遇到此问题。 有没有可能我被github页面的主机拒绝访问? 难道是他们的错?
我可以从该分支中提取并合并,但是当我尝试推送合并冲突以及代码的某些更新时,我现在收到错误(在为我的ssh密钥输入密码之后):
Enter passphrase for key '~/.ssh/id_rsa':
ERROR: Permission to <path>.git denied to <UserName>.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
也许我的用户名错误? 我尝试将其设置为我的github名称以及被拒绝的名称返回。
感谢您的任何帮助!
我认为您根本无权写入此存储库。
例如:
$ git clone git@github.com:freeCodeCamp/freeCodeCamp.git
Cloning into 'freeCodeCamp'...
remote: Enumerating objects: 113, done.
remote: Counting objects: 100% (113/113), done.
remote: Compressing objects: 100% (77/77), done.
remote: Total 96160 (delta 46), reused 81 (delta 36), pack-reused 96047
Receiving objects: 100% (96160/96160), 63.21 MiB | 1.58 MiB/s, done.
Resolving deltas: 100% (57205/57205), done.
Checking connectivity... done.
$ cd freeCodeCamp
$ git checkout -b push-test
Switched to a new branch 'push-test'
$ touch push-test
$ git add push-test
$ git commit -m push-test
[push-test 0916790] push-test
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 push-test
$ git push origin push-test
ERROR: Permission to freeCodeCamp/freeCodeCamp.git denied to msbit.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
正如@ tim-biegeleisen指出的那样,您必须与存储库所有者(可能是您自己?)交谈,并让他们允许您的用户访问。 这将是ssh -T git@github.com
的输出中提到的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.