ssh-keygen找不到ssh_askpass [英] ssh-keygen does not find ssh_askpass

查看:68
本文介绍了ssh-keygen找不到ssh_askpass的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为Windows上的Git生成SSH密钥(我刚刚安装了2.18.0),但是找不到名为ssh_askpass的东西:

I'm trying to generate SSH keys for Git on Windows (I just installed 2.18.0), but it's not finding something called ssh_askpass:

d:\src\py\>ssh-keygen -b 4096 -C my.email@dot.com
Generating public/private rsa key pair.
Enter file in which to save the key (/d//.ssh/id_rsa): D:\.ssh\id_rsa_new
ssh_askpass: exec(/usr/lib/ssh/ssh-askpass): No such file or directory
ssh_askpass: exec(/usr/lib/ssh/ssh-askpass): No such file or directory
.
.pub.

ssh-keygen二进制文件是git附带的二进制文件,位于C:\ Program Files \ Git \ usr \ bin,但该目录中没有ssh_askpass文件.

The ssh-keygen binary is the one that comes with git, in C:\Program Files\Git\usr\bin, but that directory does not have a ssh_askpass file.

我在哪里可以得到这个"ssh_askpass"?找不到它的后果是什么?

Where can I get this 'ssh_askpass' ? What is the consequence of not finding it ?

推荐答案

As in this issue, check if you have an environment variable DISPLAY=localhost:0.0 was set.

如果是这样,请通过以下方式取消设置:

If so, unset it with:

set DISPLAY=

然后重试您的 ssh-keygen 命令.

还要确保进行测试,以尝试生成没有密码短语的密钥:

Make sure also, for testing, to try and generate a key without passphrase:

ssh-keygen -t rsa -P "" -b 4096 -C my.email@dot.com


最后,检查您的%PATH%并确保调用的 ssh-keygen 是您正在考虑的(通过Git安装)


Finally, check your %PATH% and make sure ssh-keygen called is the one you are thinking about (from Git installation)

where ssh-keygen

有时候,它可能会被Cygwin的一个阴影所掩盖.

Sometimes, it can be overshadowed by one from Cygwin for instance.

这篇关于ssh-keygen找不到ssh_askpass的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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