github push error record

Article directory

background

When git executes git push (origin origin/master), an error message appears:

git push origin origin/master
Password for ‘https://[email protected]’:
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.

The general idea is that github no longer supports password push codes, and needs to configure keys to achieve. And give the corresponding link.

Solution

1. Copy the local id_rsa.pub to the SSH keys of github. (Generally under the root directory.ssh)

Open github, click the avatar in the upper right corner, a list will pop up, click "Settings", click "SSH and GPG keys" on the left column, and then click "New SSH Key" to copy the contents of the local ~/.ssh/id_rsa.pub Copy it in.

2. Modify the remote url of the local git

Copy the ssh address in the code warehouse, and then execute locally:

git remote set-url origin ssh address

example

insert image description here

WX20220907-202715@2x

Guess you like

Origin blog.csdn.net/jun5753/article/details/126753335