$ git config --global user.name "wstmljf"
$ git config --global user.email "wstmljf@163.com"
$ git config --global core.autocrlf false
$ git config --global core.quotepath off
$ git config --global core.ignorecase false
$ ssh-keygen -t rsa -C "wstmljf@163.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa):
Created directory '/c/Users/Administrator/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/Administrator/.ssh/id_rsa.
Your public key has been saved in /c/Users/Administrator/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:v+uRJrqxbPIfyXF3AoiQnml20rKbBfNiSsSdyRheMyI yefengtgm@163.com
The key's randomart image is:
+---[RSA 2048]----+
| .. |
|E o =. . . |
| + O O. . . |
| = / o . |
| . o O S . o . |
| . + o. = o o |
| . o =. = = |
| . +..+ + o |
| +*o..+. |
+----[SHA256]-----+
$ ssh-add ~/.ssh/id_rsa(第一次执行会报如下信息)
Could not open a connection to your authentication agent.
$ eval `ssh-agent`
Agent pid 3428
$ ssh-add ~/.ssh/id_rsa(正常)
Identity added: /c/Users/Administrator/.ssh/id_rsa (/c/Users/Administrator/.ssh/id_rsa)
$ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCvxLyuTGvVOg+5D56D23j7C/Wkbi1wfPk9hHR2WH+hPGu2AXuZ/qGyskXfk7EvLgc/gBYu+RiyStUxZlBSl6kqJQ0KcpdgsTO0Ua67WVVnZKp2ItZqOEzUFvGqeOHL5kAMTAYtRbLujTUmIWYGTPp/33emUPrLTr5wcuGYJ8MFNUbj/rZtwA58jaHFK1+HefYtfSnWdnZucCKsGU4BFxhzlBb7mAKJgI0F8hmbaG94DQ7q62Cdtb7f5vDaLeswiYfFNLs/6SR28akvf0DDPy+Fg3TYPjbgxxPd53ueedGx8GvNFlRWb76JJISoRTpZePfmUn2cquhYpDdn0SjjVdvj yefengtgm@163.com