Interview Prep/Git & GitHub/Authentication and Remote Access

`remote: Repository not found.` for a repo you can open in the browser.

BeginnerTroubleshootingAuthentication and Remote Access
Answer

Likely causes → GitHub returns "not found" for private repos you cannot access. Usually the wrong account or token is used, or the repo was renamed or transferred.

Diagnose →

git remote -v
ssh -T [email protected]                 # which user are you?
gh auth status                        # which account is gh using?

Fix → Authenticate as the user who has access, fix the URL (git remote set-url origin ...), and for orgs authorise the token or key for SSO.

Prevent → Use one credential per host, or per-directory identities with includeIf.

All Git & GitHub questions Roadmap: Git & GitHub

More on Authentication and Remote Access