Github 向Git添加SSH密钥
我无法向GitHub添加新的SSH密钥,我生成的SSH密钥对是Github 向Git添加SSH密钥,github,macos-sierra,ssh-keys,Github,Macos Sierra,Ssh Keys,我无法向GitHub添加新的SSH密钥,我生成的SSH密钥对是id\u rsa和id\u rsa.pub。当我尝试在GitHub中将这些添加到我的帐户时,我被告知密钥无效,因此根据错误消息中给出的建议,我尝试了各种组合,如ssh-id\u rsa 在GitHub帮助中,它说: 'If you're using macOS Sierra 10.12.2 or later, you will need to modify your ~/.ssh/config file to automatical
id\u rsa
和id\u rsa.pub
。当我尝试在GitHub中将这些添加到我的帐户时,我被告知密钥无效,因此根据错误消息中给出的建议,我尝试了各种组合,如ssh-id\u rsa
在GitHub帮助中,它说:
'If you're using macOS Sierra 10.12.2 or later, you will need to modify
your ~/.ssh/config file to automatically load keys into the ssh-agent
and store passphrases in your keychain.'
我使用的是Sierra 10.12.2,但我没有找到任何修改或创建ssh/config文件的方法,因此我认为这可能会阻止我将公钥添加到GitHub帐户
任何提示都将不胜感激:-)这就是您所说的-
您需要更新bash_配置文件。您是如何生成ssh密钥的?Brew?在终端中使用$ssh keygen,因此我还获得了一个密钥指纹和一个randomart图像