The requested URL returned a 502 error, corporate?
The problem isn't git. Rather, the site is giving you a 502 error, which is a Bad Gateway error. Following are some of the reasons and how to fix 502:
https://www.lifewire.com/502-bad-gateway-error-explained-2622939
Also, make sure you clone the git repository.
source to share
It took me a long time to find and fix this annoying problem.
In my case, the environment variables http_proxy and https_proxy were set on my computer . (You can find them in Control Panel - System and Security - Advanced System Settings - Env Variables - Bottom Pane of System Variables Section in Windows 10)
Once I removed those 2 environment variables (highlight - delete - ok), closed the Git-Terminal window and reopened it, the (http 502) problem went away. Just to confirm that I tested with Git GUI + VS Code + Git Term. Did git fetch / clone / push / etc ...
Note : I am in a corporate environment behind a strict proxy, but so is the Enterprise tfs url so I don't need a proxy meddling between me and my tfs server. I suspect (cannot confirm or rule out) that the proxy was playing MITM. The client computer is the latest build of Windows 10 running git version 2.22.0.windows.1
source to share
For reference: in a corporate environment behind an authenticated proxy, I previously edited the global git config to override for the proxy. Once I fixed this, I was able to connect.
Useful command:
git config --global --list
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[user]
name = GuyWicks
[user]
email = guy.wicks@iworkhere.com
[http]
proxy = http://public-cache:8080
[https]
proxy = http://public-cache:8080
I have commented out the four lines of the proxy (#)
source to share