authentication was removed. Please use a personal access token instead

Viewed 41497

Error when trying to connect to GitHub:

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: unable to access 'https://github.com/ershubhamyadav/dream365web.git/': The requested URL returned error: 403
7 Answers

get the solution to follow below simple steps.

  1. Go to GitHub
  2. Click on the profile picture
  3. Select setting
  4. Select Developer settings
  5. Select Personal access tokens
  6. Click on Generate new token
  7. Type Expiration time
  8. Select your preferred scopes
  9. Click on Generate token
  10. Finally, you can copy that token and use it to authenticate

Generate a token first since Github no longer accepts account passwords when authenticating Git operations and requires the use of token-based authentication beginning August 13 2021.

How to generate a token Go to the settings, then got to developer settings then select personal access tokens(3rd option) click on the button "Generate new token" on the top right Enter a note, select the expiration date, and check the scope options and click generate button at the bottom. Copy the token generated. This is what we shall replace with the token in 2nd instruction below.

git remote add origin https://github.com/username/directory-name.git
git remote set-url origin https://<token>@github.com/username/directory-name.git
git branch -M main
git push -u origin main

This resolves your issue

I've the same problem when I try to push my project in the local directory to my GitHub directory and then I try to follow those steps:

You are using Https connections instead of SSH. Just delete your current project, and clone it using SSH url. Just a note, to use this, you need to set up SSH keys and connection with Github.

Related