'ssh-keygen' 未被识别为内部或外部命令 [英] 'ssh-keygen' is not recognized as an internal or external command

查看:71
本文介绍了'ssh-keygen' 未被识别为内部或外部命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行 git push -u origin master

它告诉我权限被拒绝(公钥)致命:远程端意外挂断"

It tells me that "Permission denied (public key) fatal: The remote end hung up unexpectedly"

然后我在网上查了一下,发现我必须为我在 GitHub 上的帐户生成一个 ssh 密钥.但是,这样做时,当我尝试执行 ssh-keygen -t rsa "email@youremail.com" 时,它只是说无法识别 ssh-keygen.我尝试做 mkdir C:ssh 但这没有用.如果它有帮助,我正在使用 Ruby Rails 并且我在 Windows 计算机上.有人可以帮我吗?

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.exemsysgit 的一部分:

2012:
ssh-keygen.exe is part of msysgit:

 C:path	omsysgit1.7.11inssh-keygen.exe

如果您的 %PATH% 包含 C:path omsysgit1.7.11in,您将拥有 ssh-keygen.

if your %PATH% includes C:path omsysgit1.7.11in, you will have ssh-keygen.

2015 年更新:
ssh-keygen.exeGit For Windows,其发布 包括 PortableGit-2.4.3.1-2nd-release-candidate-64-bit.7z

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	oPortableGit-2.4.3.1-2nd-release-candidate-64-bitusrinssh-keygen.exe

这意味着 %PATH% 必须包含 c:path oPortableGit-2.4.3.1-2nd-release-candidate-64-bitusrin(没有ssh-keygen.exe)

That means the %PATH% must include c:path oPortableGit-2.4.3.1-2nd-release-candidate-64-bitusrin (without the ssh-keygen.exe)

正如我之前解释过的,Windows 版 Git 将很快淘汰 msysgit.
我在为什么从网上下载 Git 2.0 总是得到 1.9.4 安装包?" 这个新版本如何基于最新的 msys2 项目.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆