gitgithubfirewallgit-push

Checking if GitHub is blocked by organisation network


The organisation has recently rolled out some IT updates - upgraded all our PCs to Windows 10, and also reviewed and updated their security, firewall etc.

It's not my job, so don't know exactly what changes have been made.

I have cloned a repo from GitHub using Git Bash, and configured my user details.

git clone https://github.com/.../... .git
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com

I can add files to the staging area, commit - everything seems to be working fine locally. I can even pull changes made remotely to my local repo.

However, when I push, very little happens and it hangs.

git push -u origin main --verbose
Pushing to https://github.com/.../...

I have to exit with CTRL+C

The same happens when I try to initialise a repo locally and push it to a blank repository on GitHub, e.g. https://docs.github.com/en/github/importing-your-projects-to-github/importing-source-code-to-github/adding-an-existing-project-to-github-using-the-command-line

According to the documentation, connectivity issues can be caused when certain traffic is blocked by the organisation network administrator. https://docs.github.com/en/get-started/using-github/troubleshooting-connectivity-problems

My question is; Is there a way to check whether this is the case without asking the network administrator?


Solution

  • The organisation has recently rolled out some IT updates

    Check first the Git version: if, as part of those rolling updates, you have a Git 2.32 (latest one), then you would get the error I described here, referring to issue 3264 or issue 3268

    Possible workarounds:

    But if your Git version is not 2.32, then it would be a connection error, typically due to an HTTPS PROXY not set or incorrectly set.


    Note (July 2021): Git for Windows 2.32.0(2) should resolve the issue.