Interview Prep/Git & GitHub/Authentication and Remote Access

`fatal: unable to access '...': Failed to connect to proxy` or `Proxy CONNECT aborted`

IntermediateTroubleshootingAuthentication and Remote Access
Answer

Likely causes → Wrong proxy address in Git config or environment, proxy needs authentication, or the proxy does not allow the host.

Diagnose →

git config --get-regexp 'http.*proxy'
env | grep -i proxy
curl -v -x "$HTTPS_PROXY" https://github.com 2>&1 | tail

Fix → Set the correct value (git config --global http.proxy http://user:pass@proxy:8080) or remove it (git config --global --unset http.proxy) when off the corporate network. Add NO_PROXY entries for internal hosts.

Prevent → Avoid hard-coding proxies globally on laptops that move between networks.

All Git & GitHub questions Roadmap: Git & GitHub

More on Authentication and Remote Access