Git push hangs when pushing to Github?

后端 未结 21 1746
挽巷
挽巷 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:32

    I had the same problem. All the git commands accessing remote git repository are hanging. I forgot that I changed my VM network settings. Once I changed it back to NAT (as before) then they started working. It is not an issue with the git but with the network itself.

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

    I had two repositories, pushing to one of which worked fine. So, I compared their .git/config. The non-working one had at the end:

    [http]
        sslVerify = false
    

    The working one had instead:

    [credential]
        helper = store
    

    Changing .git/config solved the problem.

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

    This occurred for me when my computer's disk space was full. Delete some files & empty the trash to fix.

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

    Try the following;

    git config --global core.askpass "git-gui--askpass"

    This will prompt for credentials and then "push" succeeds if credentials are correct.

    0 讨论(0)
  • 2020-12-07 20:39
    1. Had the same problem. Was a little bit confused but the thing was I had make a git init --bare on root, that means that you won't be able to push because of you don't have any rights. Instead make a new User or in my case I used Pi User and made git init --bare there, which then later on it worked.

    2. git config --global http.postBuffer 524288000

    Maximum size in bytes of the buffer used by smart HTTP transports when POSTing data to the remote system. For requests larger than this buffer size, HTTP/1.1 and Transfer-Encoding: chunked is used to avoid creating a massive pack file locally. Default is 1 MiB, which is sufficient for most requests.

    0 讨论(0)
  • 2020-12-07 20:42
    git config --global core.askpass "git-gui--askpass"
    

    This worked for me. It may take 3-5 secs for the prompt to appear just enter your login credentials and you are good to go.

    0 讨论(0)
提交回复
热议问题