remote: Support for password authentication was removed on August 13, 2021. Please use a pe

Settings -> Developer settings -> Personal access tokens -> Generate new token

For Windows

Open your computer's Control Panel
Then click on User Account
Next, go on Credential Manager
Then go to Windows Credentials and find git:https://github.com
Finally, click on Edit then On Password and then, update the password with your Github Personal Access Token

For MAC OS

Click the Spotlight icon on the right side of the navigation bar (magnifying glass).
Type Keychain access then launch the app
In Keychain Access, search for github.com
Find the internet password entry for github.com and update it with your Github Personal Access Token.

For Linux based OS

You'll need to set up a login and email address in the local GIT client for Linux.

123$ git config --global user.name "your_github_username" 
$ git config --global user.email "your_github_email" 
$ git config -l

After configuring GIT, we can use it to access GitHub. Use your Github Personal Access Token instead of the password

1234$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY 
> Cloning into ... 
$ Username for 'https://github.com' : Enter your github username 
$ Password for 'https://github.com' : Enter your github personal access token here

You may now cache the provided record on your computer to store the token.

1$ git config --global credential.helper cache

To verify, try pulling with -v.

1$ git pull -v

You can remove the cache record if necessary.

12$ git config --global --unset credential.helper 
$ git config --system --unset credential.helper

Developer’s Hack for All OS

Go to your local computer's project folder.
To update the remote URL just type

1$ git remote set-url origin https://[githubtoken]@github.com/[username]/[repositoryname].git

Or, if you are cloning

1$ git clone https://[username]:[githubtoken]@github.com/[username]/[repositoryname].git

Note: This developer’s hack solution is compatible with all operating systems (Mac, Windows, or Linux). However, you must do this for each repository in your local. So, it is better to configure the credentials globally using the steps mentioned above.

Thank you for reading the article. I hope that by following the instructions in the correct order, you will be able to fix your problem. To learn more about git you can check Git for Programmers books.

from refer to

猜你喜欢

转载自blog.csdn.net/sinat_36050376/article/details/121801338