1

Good afternoon!

This question is over-asked and a consistent problem in general, unfortunately: git push is hanging. I have had this issue many, many times before and have been able to fix it using already-asked questions on StackOverflow (this one is my favorite, as it has the most comprehensive answer list Git push hangs when pushing to Github?). I have tried nearly everything, and in the past I have caught typos in the configs (which I have fixed and they are fine). I have committed the correct files, git status returns good things, all I need to do is push. I think I may have pinpointed a potential issue using the GIT_CURL_VERBOSE = 1 solution provided in an answer at Git push hangs when pushing to Github?, and the resulting output is this:

* Couldn't find host github.com in the .netrc file; using defaults
*   Trying <IP address here>...
* TCP_NODELAY set

Then I entered host www.github.com in the command line to get the address for github.com. Whenever I push, it always tries the one IP address, but the IP address output from the command host www.github.com consistently changes. So I applied the fix mentioned in the question and set https_proxy="" (I don't understand why this would fix things because I'm not using a proxy server). However, this did not fix the issue. I really don't understand why the IP address for github.com would be changing, so any help understanding what is going on would be much appreciated.

P.S. I should mention I don't have a .netrc file, I could probably create one if necessary, but from what I understand I don't think this would fix the issue of the nutty IP-switching for github.com.

P.P.S. I have also attempted other fixes, for example having the system try and prompt me for a password. I have done this in the past and it has worked fine, but this time it's not even prompting me for a password.

My apologies if I'm missing something novice here. Thank you!

  • GitHub has different data centers so varying IP addresses is normal. I assume you're using HTTPS. Does SSH fail the same way? Do you have an antivirus or firewall in place? Have you tried from a different network (I understand that may not be possible right now)? – bk2204 Apr 02 '20 at 01:00
  • If you mean does it have access to my SSH key, the answer is yes. I even tried double checking the SSH key. If the varying IP addresses is normal, then I guess the question is why when I do the GIT_CURL_VERBOSE = 1 git push command, the IP address it tries never changes? I unfortunately cannot try another network at the moment, but if I remember correctly I did try this again a while ago on a different network and it still wouldn't push. – mathishard.butweloveit Apr 02 '20 at 01:20
  • If you're using `GIT_CURL_VERBOSE=1`, then you're using HTTPS. Have you tried changing the remote to an equivalent SSH remote and attempting to push with SSH instead? The IP address is irrelevant here unless your network is broken or misconfigured, so ignore whether it does or doesn't change. – bk2204 Apr 02 '20 at 02:05
  • What Git are you using, on which OS, with which exact URL? – VonC Apr 02 '20 at 04:45
  • Yikes, that did it. @bk2204 Speaking from less experience here, may I ask why this fixed the issue? Thank you! – mathishard.butweloveit Apr 02 '20 at 20:15
  • 1
    It fixed the issue because there's something on your computer or in your network blocking access to GitHub, probably a firewall, antivirus, MITM device, or something else, and it only affects HTTPS, not SSH. – bk2204 Apr 02 '20 at 22:32

0 Answers0