Your GitHub username is the name you chose when you created your account, and your password is what you set during signup
Your GitHub username is the handle that appears in your profile URL — if your profile is at github.com/sarah-chen, then "sarah-chen" is your username. You chose this when you created your account, and it does not change unless you manually update it in your account settings. Your password is the one you created during signup, though you can reset it at any time if you forget it or want to change it.
The fastest way to find your username is to log in to GitHub and look at the top right corner of the page — your username appears there. If you cannot log in because you forgot your password, you can reset it without knowing your username first. GitHub will send a reset link to the email address associated with your account.
Key Takeaways
- Your GitHub username is visible in your profile URL and in the top right corner when you are logged in.
- If you forgot your password, go to github.com/login and click "Forgot password?" to reset it using your email address.
- Password resets arrive within a few minutes, and the reset link works for three hours.
- You can change your username in your account settings, but this will break any links to your old profile.
Finding your username when you are logged in
When you are signed into GitHub, your username appears in the top right corner of every page, next to your profile picture. Click on it to open a dropdown menu that shows your username, your profile link, and your settings. This is the fastest way to confirm your exact username if you are not sure whether it has a hyphen, underscore, or number in it.
You can also visit your profile page directly by clicking "Your profile" in that same dropdown. The URL of your profile page is always github.com/[your-username], so whatever appears after the final slash is your exact username.
Resetting your password if you forgot it
Go to github.com/login and look for the "Forgot password?" link below the password field. Click it, and GitHub will ask for the email address associated with your account. Type in the email you used when you signed up — it does not matter if you do not remember your username yet.
GitHub will send a password reset email to that address within a few minutes. Open the email and click the reset link. That link takes you to a page where you can create a new password. The link expires after three hours, so if you do not see the email right away, check your spam folder or request a new one.
After you set a new password, you can log in with your email address and the new password. Once you are logged in, you will see your username in the top right corner.
Changing your username in account settings
If you want to change your username to something different, click your profile picture in the top right corner and select "Settings." On the left side, click "Account" and scroll down to find the "Change username" section. Type in your new username and click "Change username" to save it.
Be aware that changing your username will break any links to your old profile. Repositories, gists, and profile links that used your old username will no longer work. GitHub will not automatically redirect old links to your new username, so anyone who bookmarked your profile or shared a link to your work will see a 404 error.
What to do if you do not remember your email address
If you forgot both your password and the email address you used to sign up, you cannot reset your password through the normal process. Instead, you will need to contact GitHub Support directly. Go to github.com/contact and fill out a support request. Explain that you cannot access your account and do not remember the email address.
GitHub Support can help you regain access, but the process may take a few days. They will ask you to verify your identity by providing information about your account, such as repositories you created or commits you made. Keep your request as detailed as possible so they can confirm you own the account.
Using a personal access token instead of your password
GitHub recommends using a personal access token instead of your password when you work from the command line or use third-party applications. A personal access token is a long string of characters that acts like a password but can be limited to specific permissions and deleted without changing your actual password.
To create a token, go to your Settings, click "Developer settings" on the left, then "Personal access tokens," and click "Generate new token." Choose what permissions the token should have — for example, you might give it access to read and write to repositories but not to delete them. GitHub will show you the token once, so copy it and save it somewhere safe. If you lose it, you can delete it and create a new one.
Keeping your password find
Use a password that is at least 12 characters long and includes uppercase letters, lowercase letters, numbers, and symbols. Avoid using words from the dictionary or personal information like your birthday or name. Do not reuse the same password on other websites — if one site gets hacked, attackers will try that password on GitHub and other accounts.
Consider using a password manager like Bitwarden, 1Password, or KeePass to generate and store strong passwords. A password manager creates random passwords for you and remembers them, so you only have to remember one master password. This is much safer than writing passwords down or reusing the same password everywhere.
Frequently Asked Questions
Can I log in with my email address instead of my username?
Yes. On the GitHub login page, you can enter either your username or the email address associated with your account. GitHub will recognize both and let you log in as long as you enter the correct password.
What happens if I change my username and then change it back?
GitHub will not automatically restore old links or redirects. If you change your username and then change it back to the original, the old links will still be broken. You would need to manually update any bookmarks or shared links.
Is there a way to see my password after I set it?
No. GitHub does not show you your password after you create it, and they cannot retrieve it for you. If you forget it, you must reset it using the "Forgot password?" link on the login page.
Can I have multiple usernames on one email address?
No. Each GitHub account must have a unique username and email address. If you want a second account, you will need to use a different email address.
Do I need to change my password regularly?
GitHub does not require you to change your password on a schedule. Change it if you think it has been compromised, if you used it on another site that was hacked, or if you have not changed it in several years. Using a strong, unique password is more important than changing it frequently.