Git push Submit to Remote Error: “remote: Support for password authentication was removed on August 13, 2021.“

Abnormal

Error reporting for remote submission:

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/xxx.git/': The requested URL returned error: 403

reason

From August 13, 2021, GitHub no longer supports submitting codes with passwords.

 

Solution:

Step 1: generate SSH key.

I use a Windows system. Usually, the SSH directory is C: \ users \ administrator \. SSH. If SSH is configured, there will be the following files, where id_ RSA is the private key, ID_ Rsa.pub is the public key.

If SSH is not configured, execute the following command in Git bash to generate SSH key.

ssh-keygen -t rsa -b 4096 -C "Your GitHub Email"

For the options that appear, just default. The first option is the SSH save directory, which can be used by default; In the second option, if you are prompted that SSH already exists, enter y to overwrite and N to not overwrite; The third option is to enter the private key password. If you don’t want to log in with the private key, the private key password is blank. Press enter directly. Press enter twice because the password will be confirmed. After successful generation, you can see the generated key file in the directory.

Step 2: configure to GitHub.

Will ID_ Copy the content in rsa.pub to the newly created SSH keys on GitHub.

Now you can use SSH to clone code and copy SSH links

Git push submission is still unsuccessful

Therefore, it is very important to use SSH link to re clone the warehouse. You need to re clone a remote warehouse to the local.

Just use remote commit again

Reference link: GitHub no longer supports password authentication solution: SSH password free and token login configuration

Read More: