What to Do When Git Says 'Password Authentication Is No Longer Supported'

Completed Medium
Start
August 3, 2025
End
August 3, 2025
Period
1Days
PIC
Last Updated
August 3, 2025
Tags
git

1. Got an Error? What Does It Mean?

If you’re trying to push files to GitHub using Git and you see this message:

Support for password authentication was removed on August 13, 2021.

It means that you can no longer log in with just a password. Since 2021, GitHub requires a more secure method — access tokens.


2. What Is an Access Token?

An access token is like a one-time password that:

  • Only you can use
  • Expires after a set time (it has an expiration date)
  • Can be limited in scope (only gives permission for what you need)

In other words, it’s a safer and more secure key than a regular password.


3. How to Get an Access Token (Easy Steps)

Step 1: Log in to GitHub

First, sign in to your GitHub account.

Step 2: Go to “Settings”

Click your profile icon in the upper-right corner, then select Settings.

Step 3: Select “Developer settings”

From the left sidebar, click Developer settings.

Step 4: Select “Personal access tokens”

This is where you’ll go to create your personal token.

Step 5: Generate a Token

  • Note (name): Give it a name like MyToken2025 to help you remember it
  • Expiration: Choose a timeframe (e.g., 30 or 90 days)
  • Scope: Check the permissions you need(repo,admin:repo_hook,delete_repo

Then click “Generate token”

Step 6: Copy and Save the Token!

Copy the token string that appears and save it in a secure place, like a notes app or password manager.

⚠ You’ll only see the token once, so make sure to copy and save it!


4. How to Use the Token for git push

When you push files to GitHub, use your access token instead of your password.

git push origin main

→ Enter your username as usual

→ For password, paste the access token you copied earlier


5. If You Don’t Want to Enter It Every Time

If typing your token every time is a hassle, run this command once to store your credentials:

git config credential.helper store

After this, Git will remember it for future pushes.


🔚 Summary

  • GitHub stopped supporting password authentication in 2021.
  • Instead, you need to use an access token, which is safer.
  • Once you create a token, you can use it to push files to GitHub.
  • Be sure to copy and store the token — you won’t see it again!