`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.
More on Authentication and Remote Access
`[email protected]: Permission denied (publickey).` followed by `fatal: Could not read from remote repository.`Beginner`remote: Support for password authentication was removed on August 13, 2021.`Beginner`fatal: Authentication failed for 'https://github.com/org/repo.git/'` with a token that worked last month.Beginner`WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!` when connecting to GitHub over SSH.Intermediate`remote: Repository not found.` for a repo you can open in the browser.Beginner`ssh -T [email protected]` says "Hi someone-else!" but you need your work account.Intermediate