Recently, I tested and built a git server on my own computer, and tossed it out by the way. I read a lot of tutorials on the Internet and it is not comprehensive enough.
linux generate ssh key (-t filetype, -b digits)
sudo ssh-keygen -t rsa -b 4096 -C "your mailbox"
execution prompt
Generating public/private rsa key pair.
Execute the location where the prompt is generated, enter Enter
Enter a file in which to save the key (/c/Users/you/.ssh/id_rsa):[Press enter]
Execute prompt for password, optional
Enter passphrase (empty for no passphrase): [Type a passphrase]
Execute prompt for duplicate password, optional
Enter same passphrase again: [Type passphrase again]
Window generation method, use PuTTYgun
Open public key
cat /root/.ssh/id_rsa.pub
Login to https://github.com
Set SSH keys in settings->SSH and GPG keys
Then set in tortoiseGit
Right-click on the project tortoiseGit->Settings, then git->Remote, delete the old origin, add a new one, the name is optional, the URL is found in the github project, the private key generated above is not in ppk format, you can use tortoiseGit PuTTYgun tool to convert
Generate a private key in ppk format, import the id_rsa file just generated, and save it as
Where the github project is cloned, select Use SSH to see the SSH connection