Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to push to git Repository. It hangs after "Writing Objects: 100%"

I am running git daemon with the following command.

c:\cygwin\bin\git daemon --reuseaddr --base-path=/cygdrive/S --export-all --verbose --enable=receive-pack

I am able to clone and pull updates but when I try to push I get

$ git push origin master

Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (6/6)

, then it hangs

I am currently using git version 1.7.0.4

like image 224
JasonRed Avatar asked Jun 18 '10 17:06

JasonRed


People also ask

Why is my git push not working?

If git push origin master not working , all you need to do is edit that file with your favourite editor and change the URL = setting to your new location. Assuming the new repository is correctly set up and you have your URL right, you'll easily be able to push and pull to and from your new remote location.

Why is git push being rejected?

A commit gets rejected and causes a failed to push some refs to error because the remote branch contains code that you do not have locally. What this means is that your local git repository is not compatible with the remote origin.

Why is git push taking so long?

If you are starting a new project from a clone, (from the CLI without a fork) when you push to a blank remote you are pushing the entire history of the project you just cloned. This is going to take some time. If you just need the clone as it stands and you don't want the history, delete the .

How do I force a git push?

To force a push to only one branch, use a + in front of the refspec to push (e.g git push origin +master to force a push to the master branch). See the <refspec>... section above for details. Force an update only if the tip of the remote-tracking ref has been integrated locally.


1 Answers

I had the same (similar?) problem with cygwin git. After one cygwin's update it stopped working properly with remote git repos, both on linux and cygwin.

At first it looked random and was hard to identify. Some commands worked, some failed. It looks like it was connected to the size of data being transferred.

I believe it's a client-side problem with SSH in cygwin as other git clients can connect normally. For me solution was to install msysgit and choose at install its own SSH client, not cygwin's. Putty should work as well, I guess.

like image 94
Tomek Szpakowicz Avatar answered Nov 12 '22 10:11

Tomek Szpakowicz