我跟随this在Windows 8.1上生成一个ssh密钥,但如果我在要求输入保存密钥的文件时按回车键,我会收到错误could not create the directory '//.ssh'
现在如果不是按回车键,我输入&#34; id_rsa&#34;,然后在执行clip < ~/.ssh/id_rsa.pub
后,我得到The system cannot find the path specified
。
这有什么办法吗?我可以切换到ubuntu,但我想在Windows上执行此操作。
答案 0 :(得分:2)
找到ssh密钥的最佳方法是:
答案 1 :(得分:1)
could not create the directory '//.ssh'
这意味着$ HOME没有被正确定义。首先尝试输入:
export HOME=/c/Users/<yourUsername>
然后ssh-keygen -t rsa -C "$your_email"
应该有用。
请注意,如果您在使用git-cmd.bat included in a standard Git for Windows (msysgit)启动的(DOS)shell中键入相同的命令,则会为您设置%HOME%
{到%USERPROFILE%
),并且相同ssh-keygen -t rsa -C "$your_email"
也可以。