本文介绍了当从上游获取时,github上的权限被拒绝(publickey)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以添加回购就好了:
$ git remote add upstream git@github.com:user / repo.git
我的ssh文件夹的内容似乎很好:
$ ls〜/ .ssh
authorized_keys id_rsa id_rsa.pub known_hosts
登录功能完美:
$ ssh -T git@github.com
嗨用户/回购!您已成功通过身份验证,但GitHub不提供shell访问权限。
但是从上游获取不起作用:
$ git fetch upstream
权限被拒绝(publickey)。
致命:远程终端意外挂断
任何想法?
解决方案
如果您没有拥有远程应用程序,只需使用只读链接即可。
git remote add upstream git://github.com/antirez/redis
i can't seem to fetch changes from upstream with ssh key authentication.
I can add the repo just fine:
$ git remote add upstream git@github.com:user/repo.git
Contents of my ssh folder seem ok:
$ ls ~/.ssh
authorized_keys id_rsa id_rsa.pub known_hosts
Logging in works perfectly:
$ ssh -T git@github.com
Hi user/repo! You've successfully authenticated, but GitHub does not provide shell access.
But fetch from upstream doesn't work:
$ git fetch upstream
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Any ideas?
解决方案
If you do not "own" the remote you should just use the read-only link
git remote add upstream git://github.com/antirez/redis
这篇关于当从上游获取时,github上的权限被拒绝(publickey)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!