Common causes
- Your SSH key isn't added to GitHub/GitLab under Settings → SSH Keys
- The ssh-agent isn't running or doesn't have your key loaded
- You have multiple SSH keys and the wrong one is being used
- The key was deleted from the remote service but still exists locally
How to fix it
- Check if your key is loaded: ssh-add -l
- Add your key to the agent: ssh-add ~/.ssh/id_ed25519
- Test SSH connection: ssh -T [email protected]
- Add your public key to GitHub: cat ~/.ssh/id_ed25519.pub and paste into Settings → SSH Keys
Example
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.Using SSH remote URL without an SSH key registered on GitHub
Have a different error?
Paste any error message into the Error Translator to get an instant explanation.
