正常情況下生成秘鑰的過程:
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] // 推薦使用默認(rèn)地址
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
最近一次在生成秘鑰的時候直接給我進(jìn)入了dquote模式
研究了好久,竟然是因?yàn)槲以谳斎?ssh-keygen -m PEM -t rsa -b 4096 -C "your.email@example.com" 這條命令的時候郵箱冒號一不小心輸入成了中文的冒號,導(dǎo)致與出現(xiàn)下面這種情況泊柬,把這條命令的冒號改成英文冒號就可以了。