Permission denied (publickey) on github when fetching from upstream

人走茶凉 提交于 2020-01-03 19:20:56

问题


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?


回答1:


If you do not "own" the remote you should just use the read-only link

git remote add upstream git://github.com/antirez/redis


来源:https://stackoverflow.com/questions/13587787/permission-denied-publickey-on-github-when-fetching-from-upstream

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!