正常情况下生成秘钥的过程:
ssh-keygen -m PEM -t rsa -b 4096 -C "your.email@example.com"
# Creates a new ssh key, using the provided email as a label
# Generating public/private rsa key pair.
Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter] // 推荐使用默认地址
Enter passphrase (empty for no passphrase): // 此处不填写,回车即可;如果填写密码,则每次使用 SSH 方式推送代码时都会要求输入密码。
Your identification has been saved in /Users/you/.ssh/id_rsa.
# Your public key has been saved in /Users/you/.ssh/id_rsa.pub.
# The key fingerprint is:
# 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db your.email@example.com
最近一次在生成秘钥的时候直接给我进入了dquote模式
研究了好久,竟然是因为我在输入 ssh-keygen -m PEM -t rsa -b 4096 -C "your.email@example.com" 这条命令的时候邮箱冒号一不小心输入成了中文的冒号,导致与出现下面这种情况,把这条命令的冒号改成英文冒号就可以了。
网友评论