Solving the Git Error: "Support for password authentication was removed on August 13, 2021"
Git is one of the most popular version control systems in use today, and it allows developers to track changes to their code, collaborate with others, and manage their software development workflows. However, from time to time, users may encounter issues when using Git. One such issue is the error message "Support for password authentication was removed on August 13, 2021." In this blog, we'll look at what this error means and how to resolve it.
What Does the Error Mean?
The error message "Support for password authentication was removed on August 13, 2021" indicates that the Git server you are connecting to has disabled password-based authentication and now requires a more secure form of authentication. This change was made to improve the security of Git and to ensure that user data is protected.
Why Was Password Authentication Removed?
Password authentication is not considered to be a secure form of authentication, as passwords can be easily lost, stolen, or guessed. To prevent unauthorized access to Git servers and user data, it was decided to remove password authentication and instead encourage users to use key-based authentication or personal access tokens (PATs). Key-based authentication is a more secure method of authentication, as it uses public/private key pairs to authenticate users.
How to Solve the Error?
To solve the error, you will need to switch from using password authentication to using key-based authentication or a personal access token (PAT). Here's how:
- Personal Access Tokens (PATs)
Personal access tokens (PATs) are alternative authentication methods that allow you to authenticate to Git servers without using a password. PATs are secure and can be revoked at any time, making them a good alternative to password authentication. To use a PAT, you will need to generate one and configure your Git client to use it. You can follow the instruction to do so.
From your GitHub account, go to Settings → Developer Settings → Personal Access Token → Generate New Token (Give your password) → Fillup the form → click Generate token → Copy the generated Token, it will be something like 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
Now you can use the Personal Access Token as your password:-
$ git push origin master
\>Username for 'https://github.com': <your username>
\>Password for 'https://<your username>@github.com': <your PAT token>
The error message "Support for password authentication was removed on August 13, 2021" indicates that password authentication is no longer supported by the Git server you are connecting to. To resolve this issue, you will need to switch to using key-based authentication or a personal access token (PAT). By using these more secure authentication methods, you can ensure the security of your Git server and user data.