Git push hangs everytime I try to push to github. I am using Cygwin and Windows 7. Git functions fine locally tracking branches, providing status, setting global user.name a
In my case the issue was there was some process that had locked my keychain access...
Force quit all other apps to make sure keychain access is not locked on your Mac
This occurred for me, here is how I fixed. I used Cygwin and it hanged so I tried prompting for username/password on commit :
git config --global core.askpass "git-gui--askpass"
Once I executed git push -u origin master
and entered username password, it still did hang but appeared to commit to GitHub.
Used same command from dos prompt : git push -u origin master
Git does not hang. So perhaps issue related to CygWin in my case.
I also had an issue where git hangs on the "Writing objects" part on Windows 7 (using msysgit, the default windows client from git) and this is the first hit I got in google, so I will also post my answer here.
git config --global core.askpass "git-gui--askpass"
did not work unfotunately, but after some researching I found the tip on Git push halts on "Writing Objects: 100%" to use git config –global sendpack.sideband false
which worked perfectly.
I can finally push from the commandline again!
I had the same issue. Stop worrying and searching endless complicated solutions, just remove git and reinstall it.
sudo apt-get purge git
sudo apt-get autoremove
sudo apt-get install git
Thats it. It should work now
Try creating a script like ~/sshv.sh
that will show you what ssh is up to:
#!/bin/bash
ssh -vvv "$@"
Allow execution of the ~/sshv.sh
file for the owner of the file:
chmod u+x ~/sshv.sh
Then invoke your git push
with:
GIT_SSH=~/sshv.sh git push ...
In my case, this helped me figure out that I was using ssh shared connections that needed to be closed, so I killed those ssh processes and it started working.
Restart your ssh agent!
killall ssh-agent; eval `ssh-agent`