Error AtlasError Documentation and Resolution

GitHub SSH Permission denied (publickey)

Permission denied (publickey)

GitHub rejected SSH authentication. The SSH client may be presenting no key, the wrong key, or a key that is not attached to the intended GitHub account.

Permission denied (publickey)authentication
Permission denied (publickey)
  • The remote uses a GitHub username instead of the SSH user git.
  • The desired key is missing from the agent or the wrong account owns the public key.
  • Using sudo changes the user and keys used by Git.
  1. Run git remote -v and confirm the intended SSH remote uses git@github.com, not your GitHub username as the SSH user.
  2. Run ssh -vT git@github.com to inspect which key is offered, and ssh-add -l -E sha256 to list loaded key fingerprints. Do not publish private key contents.
  3. Verify the matching public key is attached to the intended GitHub account and that the agent or SSH configuration selects its corresponding private key.
  4. Retry the SSH test and check the authenticated username. Avoid sudo git as an authentication workaround.
GitHub official documentation