Can't push to Github using SSH

Viewed 3483

I am trying to push to my remote git repository that I cloned using SSH, but I can't push to it. I get the following error:

fatal: Remote end hung up unexpectedly

I have done some searching and found that most people had to do git config ssh.postBuffer 524288000, but this has not worked for me; I still get the same error.

I am running my local repository on Levinux (because my university course requires it). I generated my SSH key and added it to GitHub already. Connecting using https works, but I'd rather use SSH. Any suggestions would be great!

2 Answers

For me, once I got the key to show up in the Help>Show SSH Key dialog box and

ssh -T git@github.com

was working fine; however when I ran

git remote -v

I could see that I didn't clone the repo from the ssh url

origin https://github.com/User/Project.git (fetch)
origin https://github.com/User/Project.git (push)

so I had to do

git remote set-url --push origin 'git@github.com:User/Project.git'

and then Git Gui was pushing just fine.

Related