'ssh-keygen'不被识别为内部或外部命令 [英] 'ssh-keygen' is not recognized as an internal or external command
问题描述
我运行 git push -u origin master
它告诉我Permission denied(public key)致命的:远程终端意外挂断
然后我查找了互联网,发现我必须在GitHub上为我的帐户生成一个ssh密钥。然而,这样做的时候,当我试图做ssh-keygen -t rsaemail@youremail.com时,它只是说ssh-keygen不被识别。我试图做mkdir C:\ssh,但没有奏效。如果有帮助,我正在使用Ruby Rails,而且我在Windows计算机上。任何人都可以帮助我吗? 2012:
ssh-keygen.exe
是 msysgit 的一部分:
C:\path\to\msysgit1.7.11\bin\ssh -keygen.exe
$ c如果您的%PATH%
包括 C:\ $ c>
你将有 ssh-keygen
。
更新2015:
ssh-keygen.exe
是 Git For Windows 的一部分,其 发布 include PortableGit-2.4.3.1-2nd-release-candidate-64-bit.7z
c:\path\to\PortableGit-2.4.3.1-2nd-release-candidate-64-bit\usr\bin\ssh-keygen.exe
这意味着%PATH%
必须包含 c:\ path \ to\PortableGit-2.4.3.1-2nd-release-candidate-64-bit\usr\bin
(没有 ssh-keygen.exe
)
由于我解释过b efore ,Git for Windows即将淘汰msysgit。
我详细介绍于为什么会这样如果你从网上下载Git 2.0,你总会得到一个1.9.4安装程序包?这个新版本是如何基于更新的 msys2 project 。
I run git push -u origin master
It tells me that "Permission denied (public key) fatal: The remote end hung up unexpectedly"
Then I looked up on the internet and found that I had to generate an ssh key for my account on GitHub. However, upon doing so, when I tried to do ssh-keygen -t rsa "email@youremail.com" it simply said ssh-keygen is not recognized. I tried doing mkdir C:\ssh but that didn't work. If it helps I'm using Ruby Rails and I'm on a Windows computer. Could anyone help me?
2012:
ssh-keygen.exe
is part of msysgit:
C:\path\to\msysgit1.7.11\bin\ssh-keygen.exe
if your %PATH%
includes C:\path\to\msysgit1.7.11\bin\
, you will have ssh-keygen
.
Update 2015:
ssh-keygen.exe
is part of Git For Windows, whose releases include PortableGit-2.4.3.1-2nd-release-candidate-64-bit.7z
c:\path\to\PortableGit-2.4.3.1-2nd-release-candidate-64-bit\usr\bin\ssh-keygen.exe
That means the %PATH%
must include c:\path\to\PortableGit-2.4.3.1-2nd-release-candidate-64-bit\usr\bin
(without the ssh-keygen.exe
)
As I explained before, Git for Windows will soon phase out msysgit.
I detailed in "Why is it that if you download Git 2.0 from the net, you always get a 1.9.4 installer package?" how this new version is based on the more recent msys2 project.
这篇关于'ssh-keygen'不被识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!