Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fatal: The remote end hung up unexpectedly while pushing to Git repository

Tags:

git

push

I created a new repository called DirectorySocket, and from my project directory called DirectorySocket I did the following:

$ git init
$ git add .
$ git remote add origin [email protected]:neilghosh/DirectorySocket.git
$ git commit -m "Initial version"
$ git push origin master

And I got the following error:

ERROR: Permission to neilghosh/DirectorySocket.git denied to neilghosh/googly. fatal: The remote end hung up unexpectedly

Why is it trying to push to another repository of mine on GitHub? This happens also after I deleted the .git folder and started over.

like image 917
Neil Avatar asked Jul 24 '11 18:07

Neil


People also ask

How do I fix fatal the remote end hung up unexpectedly in git?

To solve the issue, change the settings of your buffer so that you have enough space available. You can increase the buffer value up to 2000000000.

How do I fix a fatal error on github?

The above error indicates that there is one more commit that was pushed to the same branch, but you don't have that commit on your local machine. To fix this, you can easily run a git pull origin <your-branch> , solve the conflicts if any, and then run git push origin <your-branch> to push your changes as well.

What is http postBuffer?

postBuffer is about: Maximum size in bytes of the buffer used by smart HTTP transports when POSTing data to the remote system.

What is GIT buffer size?

The default is 1MB.


3 Answers

Since it is your repository, check if the keys and token are setup properly as per the instructions provided by GitHub.

http://help.github.com/win-set-up-git/

As a first step, see if

 ssh -T [email protected]

works.

like image 148
manojlds Avatar answered Oct 16 '22 00:10

manojlds


There are a couple of leads here - it is most likely an authorization issue. Have you uploaded your public key to GitHub?

What is your network situation? I get this response behind my restrictive corporate firewall - the answer there is to use the smart HTTP support now supported by GitHub.

like image 45
Nate Avatar answered Oct 15 '22 23:10

Nate


Direct link to GitHub explanation here:

https://help.github.com/articles/generating-ssh-keys

like image 22
Flavio Wuensche Avatar answered Oct 15 '22 22:10

Flavio Wuensche