重点!!!
你ssh-keygen -t rsa -C "邮箱"生成的时候,添加了密码!!
这导致你每次拉取代码的时候本地私钥都要到公钥那里去验证密码!!
设置密钥的时候除了选择yes/no ,其他都不要选,直接空格!!
ssh-keygen -t rsa -C "zhangyk@fitech.com.cn"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/zhangyk123/.ssh/id_rsa):
/c/Users/zhangyk123/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): **!!!!空格**
Enter same passphrase again:**!!!空格**
Your identification has been saved in /c/Users/zhangyk123/.ssh/id_rsa
Your public key has been saved in /c/Users/zhangyk123/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:UCM+lmOD81U7mXZWr3+puxtvIdFw9HRoCi69Sc2IBEQ zhangyk@fitech.com.cn
The key's randomart image is:
+---[RSA 3072]----+
| oE.o . ooo|
| o +.o.+ oo+o|
| o X..+*=oo+ o|
| = *o.=++. o |
| . So o o |
| o . o.|
| ...+|
| +..|
| ==. |
+----[SHA256]-----+