authentication was removed. Please use a personal access token instead
Asked Answered
D

8

14

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
Dartmouth answered 15/8, 2021 at 5:40 Comment(0)
D
25

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
Dartmouth answered 15/8, 2021 at 5:51 Comment(3)
I generated it how can use it? Best regardsBashaw
to use it for an existing repo you can update the config file in the .git folder and insert the token into the origin, so url = github.com/yourrepo becomes url = https://<tokenhere>@github.com/Alleen
Can you explain further ?Rosierosily
G
17
  1. Create an access token following this: https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token
  2. Change the URL of the repo to: https://<access token>@github.com/userName/repo.git

If on jenkins, set the credentials to none.

Gala answered 15/8, 2021 at 17:0 Comment(0)
A
14

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

Aba answered 9/10, 2021 at 12:44 Comment(2)
port 443: Connection refusedCoopersmith
Do you know why went wrong?Coopersmith
R
5

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:

Ratify answered 8/9, 2021 at 2:27 Comment(1)
Please provide additional details in your answer. As it's currently written, it's hard to understand your solution.Parasang
V
0

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.

Vd answered 8/12, 2021 at 9:59 Comment(0)
D
-1

Beginning August 13, 2021, Github no longer accepts account passwords when authenticating Git operations and will require the use of token-based authentication.

Guide Line Youtube Video: https://youtu.be/eZrOd5qM5WM Steps to create Personal Access Token: http://mtahirmunir.com/github-support-for-password-authentication-was-removed/

Demy answered 20/8, 2021 at 17:31 Comment(0)
T
-1

I got this error on my console or on my Git Bash when I tried to use

git push -u origin main

Logon failed, use ctrl+c to cancel basic credential prompt. remote: Support for password authentication was removed on August 13, 2021. remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication. fatal: Authentication failed for 'https://github.com/JaseemKhan211/myNatours.git'

It's weird because today I have a lot of time to fix this error. To push the code to my GitHub repository, I open Git Bash and run the first command.

git init

then, all commands are run one by one

git status

git add.

git status

git commit -m "first commit"

git status

git remote add origin https://github.com/JaseemKhan211/myNatours.git

git push -u origin main

The last executed command resulted in a window open, prompting for a username and password to be filled. However, upon attempting to fill out this information, an error was displayed in the console.

I fixed the problem just simply by upgrading Git to the latest version!

Now instead of adding your username/email and password, you will login with your browser. The image below is the new interface you must update your Git to see the new changes!

enter image description here

If you are using Windows, you can simply use this command below to update your Git:

git update-git-for-windows

Then update Git and then proceed to run the last command once more

enter image description here

After successful login, we got this message

enter image description here

Titfer answered 13/8, 2023 at 20:18 Comment(0)
Q
-2

Starting from 2021/8/13 you will get some error messages like this when you push the code...

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

Follow the steps below to fix it. https://github.com/wuduhren/sourcetree-github-setup/blob/main/README.md

Quality answered 24/8, 2021 at 23:19 Comment(2)
This boils down to a link-only answer, please put the relevant parts of the link into the body of the answer itself, lest it bitrots.Headphone
Adequate explanation not providedEstrange

© 2022 - 2024 — McMap. All rights reserved.