Git:致命:无法从远程存储库读取.请确保您拥有正确的访问权限并且存储库存在 [英] Git : fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists
问题描述
我收到此错误 -
D:ProjectswampwwwREPO [master]>git pull 原点大师警告:将github.com,192.30.252.128"(RSA)永久添加到已知主机列表中.错误:未找到存储库.致命:无法从远程存储库读取.请确保您拥有正确的访问权限并且存储库存在.
git remote -v
的输出D:ProjectswampwwwREPO [master]>git远程 -vorigin git@github.com:username/repo.git(获取)origin git@github.com:username/repo.git(推送)
ssh -Tv git@github.com 命令的最终信息 -
嗨[我的用户名]!您已成功通过身份验证,但 GitHub 不提供 shell 访问.
我该如何解决?
我问了 在讨论:
<块引用><块引用>ssh -T git@github.com
是否输出与您的 ssh url 相同的用户名(在 Hi [My Username]!
)回购(git@github.com:username/repo.git
)?
抱歉它没有显示相同的名称
这意味着凭据以某种方式发生了变化.
一种解决方案是至少将 %HOME%.sshid_rsa.pub
复制到 正确 GitHub 帐户的 SSH 密钥部分
OP 补充:
<块引用><块引用>我正在处理私人回购.所以在 git@github.com:username/repo.git,
我回复:
<块引用>如果您能够克隆/推送到用户名不是您自己的 GitHub 帐户的存储库,那一定是因为您已将之前的公共 ssh 密钥添加为存储库所有者对该存储库的贡献者.
接下来是要求同一个 repo 所有者将您当前的公共 ssh 密钥 %HOME%.sshid_rsa.pub
添加到 repo 贡献者列表中.
因此,请与所有者确认您(即您的公共 ssh 密钥)是否被声明为贡献者.
I am getting this error -
D:ProjectswampwwwREPO [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:ProjectswampwwwREPO [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%.sshid_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%.sshid_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屋!