Site icon MageComp Blog

“Support for password authentication removed” for GitHub. How to Generate Personal Access Token?

Support for password authentication removed for GitHub How to Generate Personal Access Token

Hello Magento Friends,

Did you also receive the following, fatal: Authentication Failed error while trying git push or pull?

The fatal: Authentication Failed error is shown when you are accessing GitHub with a password instead of a personal access token.

Move ahead with this blog to know Why Authentication Failed error occurs and How to fix it.

GitHub removed support for Password Authentication:

Github has removed the support for Password Authentication from August 13, 2021.

The password authentication support has been eliminated because it is easy for people to crack the passwords. A personal access token can reduce the damage.

Now GitHub will not allow if you try to use git by username and password. Instead, you need to use a personal access token to access git.

In the future when you try to use Git operations like push or pull, it will prompt you to enter your username and password. Enter your GitHub Username but for the password field, you need to generate a personal access token and enter it in the password field. Working with the command line, may not receive an indication for the successful password entry. Just click Enter after pasting the personal access token.

Now the question is, how you can generate your Personal Access Token. Let’s head on to the steps to Generate Personal Access Tokens.

How to Generate Personal Access Token?

Step 1: Open GitHub from here and log in.

Step 2: Choose Setting from the menu.

Step 3: Now click on Developer Settings

Step 4: Next, choose Personal access tokens

Step 5: Hit the Generate new token button.

Step 6: Then, fill in the necessary information like Note, Expiration, Select Scopes.

At last click on Generate Token button

Step 7: A new token has been generated successfully. The generated token can be used to access git with username and token.

You need to run the below code before push or pull until you’re no longer prompted.

git remote set-url origin https://<githubtoken>@github.com/<username>/<repositoryname>.git

or

git remote set-url origin https://<token>@github.com/<username>/<repo>

Conclusion:

Hence, this way you can solve the “Support for password authentication removed” GitHub Error by Generating Personal Access Token. Know more about GitHub and its Code Scanning Security.

If you face any difficulty contact me via the comment part. Share and Let your friends gain knowledge about this and easily solve GitHub Authentication Error.

Happy Reading!

Exit mobile version