Skip to main content

Authentication documentation

Authenticate securely to GitHub with passwords, tokens, SSH keys, and more—and keep your account protected.

Articles

Learn about authentication

About authentication to GitHub

You can securely access your account's resources by authenticating to GitHub, using different credentials depending on where you authenticate.
Learn about authentication

About commit signature verification

Using GPG, SSH, or S/MIME, you can sign tags and commits locally. These tags or commits are marked as verified on GitHub so other people can be confident that the changes come from a trusted source.
Learn about authentication

About passkeys

Passkeys allow you to sign in safely and easily, without requiring a password and two-factor authentication.
Learn about authentication

About SSH

Using the SSH protocol, you can connect and authenticate to remote servers and services. With SSH keys, you can connect to GitHub without supplying your username and personal access token at each visit. You can also use an SSH key to sign commits.
Learn about authentication

About two-factor authentication

Two-factor authentication (2FA) is an extra layer of security used when logging into websites or apps. With 2FA, you have to log in with your username and password and provide another form of authentication that only you know or have access to.
Set up two-factor authentication

Accessing GitHub using two-factor authentication

With 2FA enabled, you'll be asked to provide your 2FA authentication code, as well as your password, when you sign in to GitHub.
Sign your commits

Adding a GPG key to your GitHub account

To configure your account on GitHub to use your new (or existing) GPG key, you'll also need to add the key to your account.
Connect with SSH

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.
Sign your commits

Associating an email with your GPG key

Your GPG key must be associated with a verified email that matches your committer identity.
Showing 1-9 of 54