`remote: Resource protected by organization SAML enforcement. You must grant your OAuth token or SSH key access to this organization.`
IntermediateTroubleshootingAuthentication and Remote Access
Answer
Likely causes → The org requires SAML SSO, and your token or SSH key has not been authorised for it.
Diagnose → In GitHub → Settings → SSH keys (or Tokens), look for a "Configure SSO" button next to the credential.
Fix → Click Configure SSO → Authorize for the organisation, sign in through your identity provider, then retry the Git command. For gh, run gh auth refresh -s repo.
Prevent → Document the SSO authorisation step for new joiners and use short-lived tokens.
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