4

i can't seem to fetch changes from upstream with ssh key authentication.

I can add the repo just fine:

$ git remote add upstream [email protected]: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 [email protected]
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?

0

1 Answer 1

9

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

git remote add upstream git://github.com/antirez/redis
1
  • 1
    Very use full description and command. It's saved my lot of time. Very thanks for your informative answer. Commented Aug 7, 2019 at 8:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.