Article version: GitHub.com
Keeping your account and data secure
To protect your personal information, you should keep both your GitHub account and any associated data secure.
Creating a strong passwordโ
Secure your GitHub account with a strong and unique password using a password manager.
Updating your GitHub access credentialsโ
GitHub credentials include not only your password, but also the access tokens, SSH keys, and application API tokens you use to communicate with GitHub. Should you have the need, you can reset all of these access credentials yourself.
Creating a personal access token for the command lineโ
You can create a personal access token and use it in place of a password when performing Git operations over HTTPS with Git on the command line or the API.
Reviewing your SSH keysโ
To keep your credentials secure, you should regularly audit your SSH keys, deploy keys, and review authorized applications that access your GitHub account.
Reviewing your deploy keysโ
You should review deploy keys to ensure that there aren't any unauthorized (or possibly compromised) keys. You can also approve existing deploy keys that are valid.
Authorizing OAuth Appsโ
You can connect your GitHub identity to third-party applications using OAuth. When authorizing an OAuth App, you should ensure you trust the application, review who it's developed by, and review the kinds of information the application wants to access.
Reviewing your authorized integrationsโ
You can review your authorized integrations to audit the access that each integration has to your account and data.
Connecting with third-party applicationsโ
You can connect your GitHub identity to third-party applications using OAuth. When authorizing one of these applications, you should ensure you trust the application, review who it's developed by, and review the kinds of information the application wants to access.
Reviewing your authorized applications (OAuth)โ
You should review your authorized applications to verify that no new applications with expansive permissions are authorized, such as those that have access to your private repositories.
Reviewing your security logโ
You can review the security log for your user account to better understand actions you've performed and actions others have performed that involve you.
Removing sensitive data from a repositoryโ
If you commit sensitive data, such as a password or SSH key into a Git repository, you can remove it from the history. To entirely remove unwanted files from a repository's history you can use either the git filter-branch command or the BFG Repo-Cleaner open source tool.
About anonymized image URLsโ
If you upload an image to GitHub, the URL of the image will be modified so your information is not trackable.
About GitHub's IP addressesโ
GitHub serves applications from multiple IP address ranges, which are available using the API.
GitHub's SSH key fingerprintsโ
Public key fingerprints can be used to validate a connection to a remote server.
Sudo modeโ
GitHub asks you for your password before you can modify your email address, authorize third-party applications, or add new public keys, or initiate other sudo-protected actions.
Preventing unauthorized accessโ
You may be alerted to a security incident in the media, such as the discovery of the Heartbleed bug, or your computer could be stolen while you're signed in to GitHub. In such cases, changing your password prevents any unintended future access to your account and projects.