Git push hangs when pushing to Github?

后端 未结 21 1744
挽巷
挽巷 2020-12-07 19:48

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

相关标签:
21条回答
  • 2020-12-07 20:24

    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

    0 讨论(0)
  • 2020-12-07 20:28

    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.

    0 讨论(0)
  • 2020-12-07 20:29

    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!

    0 讨论(0)
  • 2020-12-07 20:30

    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

    0 讨论(0)
  • 2020-12-07 20:31

    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.

    0 讨论(0)
  • 2020-12-07 20:32

    Restart your ssh agent!

    killall ssh-agent; eval `ssh-agent`
    
    0 讨论(0)
提交回复
热议问题