Authentication documentation
Keep your account and data secure with features like two-factor authentication, SSH, and commit signature verification.
Start here
- Generating a new SSH key and adding it to the ssh-agent- After you've checked for existing SSH keys, you can generate a new SSH key to use for authentication, then add it to the ssh-agent. 
- Managing your personal access tokens- You can use a personal access token in place of a password when authenticating to GitHub in the command line or with the API. 
- Configuring two-factor authentication- You can choose among multiple options to add a second source of authentication to your account. 
Popular
- Troubleshooting SSH- When using SSH to connect and authenticate to GitHub, you may need to troubleshoot unexpected issues that may arise. 
- Checking for existing SSH keys- Before you generate an SSH key, you can check to see if you have any existing SSH keys. 
- Adding a new SSH key to your GitHub account- To configure your account on your GitHub Enterprise Server instance to use your new (or existing) SSH key, you'll also need to add the key to your account. 
- Displaying verification statuses for all of your commits- You can enable vigilant mode for commit signature verification to mark all of your commits and tags with a signature verification status. 
- Recovering your account if you lose your 2FA credentials- If you lose access to your two-factor authentication credentials, you can use your recovery codes, or another recovery option, to regain access to your account. 
- Error: Permission denied (publickey)- A "Permission denied" error means that the server rejected your connection. There could be several reasons why, and the most common examples are explained below. 
- Creating a strong password- Secure your account on GitHub with a strong and unique password using a password manager. 
Keeping your account and data secure
- About authentication to GitHub
- Creating a strong password
- Switching between accounts
- Updating your GitHub access credentials
- Managing your personal access tokens
- Reviewing your SSH keys
- Reviewing your deploy keys
- Token expiration and revocation
- Reviewing your security log
- Security log events
- Removing sensitive data from a repository
- Sudo mode
- Preventing unauthorized access
- Viewing and managing your sessions
Securing your account with two-factor authentication (2FA)
- About two-factor authentication
- Configuring two-factor authentication
- Configuring two-factor authentication recovery methods
- Accessing GitHub using two-factor authentication
- Changing your two-factor authentication method
- Troubleshooting two-factor authentication issues
- Recovering your account if you lose your 2FA credentials
- Disabling two-factor authentication for your personal account
Troubleshooting SSH
- Recovering your SSH key passphrase
- Error: Permission denied (publickey)
- Error: Bad file number
- Error: Key already in use
- Error: Permission to user/repo denied to other-user
- Error: Permission to user/repo denied to user/other-repo
- Error: Agent admitted failure to sign
- Error: ssh-add: illegal option -- apple-use-keychain
- Error: Unknown key type
- Error: We're doing an SSH key audit