`fatal: unable to access '...': Could not resolve host: github.com`
BeginnerTroubleshootingAuthentication and Remote Access
Answer
Likely causes → No network, DNS failure, VPN changing DNS, or a proxy that is required but not set.
Diagnose →
ping -c1 8.8.8.8
nslookup github.com
curl -sI https://github.com | head -1
Fix → Fix connectivity or DNS (reconnect VPN, change resolver). If a proxy is mandatory, set git config --global http.proxy http://proxy.corp:8080.
Prevent → In CI, use a runner image with correct DNS and proxy variables.
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