Interview Prep/Git & GitHub/Authentication and Remote Access

`remote: Permission to org/repo.git denied to user.` then `The requested URL returned error: 403`

IntermediateTroubleshootingAuthentication and Remote Access
Answer

Likely causes → Your account has read-only access, the token has no write scope, or an org policy restricts classic tokens.

Diagnose →

gh api repos/ORG/REPO --jq .permissions
gh auth status

Fix → Ask for write access, or create a fine-grained token with "Contents: Read and write" for that repo, and authorise SSO if required. If you only have read access, push to a fork and open a PR.

Prevent → Grant access through teams, not individuals.

All Git & GitHub questions Roadmap: Git & GitHub

More on Authentication and Remote Access