Git:致命的:无法从远程存储库读取。请确保您拥有正确的访问权限并存在存储库 [英] Git : fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists

查看:10594
本文介绍了Git:致命的:无法从远程存储库读取。请确保您拥有正确的访问权限并存在存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  D:\Projects\wamp\www\REPO [master] > git pull origin master 
警告:将'github.com,192.30.252.128'(RSA)永久添加到已知主机列表中。
错误:找不到存储库。
致命:无法从远程存储库读取。

请确保您拥有正确的访问权限
并存在存储库。

输出 git remote -v

  D:\Projects\wamp\www\REPO [master]> git remote -v 
origin git@github.com:username / repo.git(fetch)
origin git@github.com:username / repo.git(push)

$ b

ssh -Tv git@github.com 命令的最终消息 -

 嗨[我的用户名]!您已成功通过身份验证,但GitHub不提供shell访问权限。 

我该如何解决它?

解决方案

我在讨论中询问了 $ b



ssh -T git@github.com 在你的仓库的ssh url( git @ github)中输入相同的用户名()中的 com:username / repo.git )?


抱歉它没有显示相同的名称


这意味着凭证已经改变了。



一个解决方案是至少复制%HOME%\.ssh\id_rsa.pub in 右侧GitHub帐户的SSH密钥部分



OP增加:



我是致力于私人回购。所以在git@github.com:username / repo.git,


我回答说: p>


如果您能够克隆/推送那个用户名不是您自己的GitHub帐户的回购站,那肯定是因为您有以前的公用ssh key添加为回购所有者的回购贡献者。



接下来是要求相同的回购所有者添加您当前的公用ssh密钥 %HOME%\.ssh\id_rsa.pub 添加到回购贡献者列表中。

因此,请向所有者确认您(即您的公用ssh密钥)已声明为贡献者。



I am getting this error -

D:\Projects\wamp\www\REPO [master]> git pull origin master
Warning: Permanently added 'github.com,192.30.252.128' (RSA) 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.

The output of git remote -v

D:\Projects\wamp\www\REPO [master]> git remote -v
origin  git@github.com:username/repo.git (fetch)
origin  git@github.com:username/repo.git (push)

Final message of ssh -Tv git@github.com command -

Hi [My Username]! You've successfully authenticated, but GitHub does not provide shell access.

How can I solve it?

解决方案

I asked in the discussion:

does ssh -T git@github.com ouput the same username (in Hi [My Username]!) as in the one used for the ssh url of your repo (git@github.com:username/repo.git)?

Sorry It not showing same name

That means somehow the credentials have changed.

One solution would be to at least copy %HOME%\.ssh\id_rsa.pub in the SSH keys section of the right GitHub account

The OP adds:

I am working on private repo. So In git@github.com:username/repo.git,

I replied:

If you were able to clone/push to that repo whose username is not your own GitHub account, that must be because you had your previous public ssh key added as a contributor to that repo by the repo's owner.

What next is to ask that same repo owner to add your current public ssh key %HOME%\.ssh\id_rsa.pub to the repo contributor list.
So check with the owner that you (meaning your public ssh key) are declared as a contributor.

这篇关于Git:致命的:无法从远程存储库读取。请确保您拥有正确的访问权限并存在存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆