Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permission denied (publickey) on github when fetching from upstream

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?

like image 847
user1856950 Avatar asked Jan 14 '23 22:01

user1856950


1 Answers

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

git remote add upstream git://github.com/antirez/redis
like image 188
Zombo Avatar answered Jan 17 '23 10:01

Zombo