问题
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