[英]Eclipse git and ssh-agent
I use eclipse with git (egit). 我使用eit和git(egit)。
I would like to make use of my ssh-agent so I can push from eclipse. 我想利用我的ssh-agent所以我可以从日食中推出。 Does anybody know how to set up egit to use ssh-agent?
有谁知道如何设置egit使用ssh-agent?
background: I can't upload my key to eclipse as my keys are on a cryptostick. 背景:我无法将我的密钥上传到eclipse,因为我的密钥是在cryptostick上。 My ssh-agent can loaded with the help of opensc.
我的ssh-agent可以在opensc的帮助下加载。
In your eclipse startup script or .profile
(or wherever) add export GIT_SSH=/usr/bin/ssh
before starting eclipse. 在你的eclipse启动脚本或
.profile
(或任何地方)中,在启动eclipse之前添加export GIT_SSH=/usr/bin/ssh
。 Then eclipse uses default ssh which uses ssh agent and you cann run pull and push commands within eclipse even if your key is on a smartcard. 然后eclipse使用默认的ssh,它使用ssh代理,即使你的密钥在智能卡上,你也可以在eclipse中运行pull和push命令。
Edit: GIT_SSH is interpreted by eclipse's egit, but also by the stand-alone git. 编辑:GIT_SSH由eclipse的egit解释,但也由独立的git解释。 Setting it to
/usr/bin/ssh
sets it to the default value for stand-alone git, so only egit will change it's behavior. 将它设置为
/usr/bin/ssh
将其设置为独立git的默认值,因此只有egit才会改变它的行为。
Update June 2016 (4 years later): Gunnar Wagenknecht now mentions in the comments : 2016年6月更新(4年后): Gunnar Wagenknecht现在在评论中提到:
It's now possible in Eclipse Neon with project
eclipseguru/eclipse-jsch-agent-proxy
, an Eclipse ssh-agent and Pageant support.它现在可以在Eclipse Neon中使用项目
eclipseguru/eclipse-jsch-agent-proxy
,Eclipse ssh-agent和Pageant支持。
A workaround for older Eclipse versions is to use the native OS SSH client instead of the Eclipse built-in one by setting GIT_SSH
environment variable: 旧版Eclipse的解决方法是通过设置
GIT_SSH
环境变量来使用本机OS SSH客户端而不是Eclipse内置的客户端:
export GIT_SSH=/usr/bin/ssh
(See EGit SSH configuration and EGit FAQ, SSH Config ) (参见EGit SSH配置和EGit FAQ,SSH配置 )
No way! 没门! Sooo many years of eclipse out there and still no way to work with a
smartcards
and ssh
/ ssh-agent
? 那么多年的日食仍然没有办法使用
smartcards
和ssh
/ ssh-agent
? Really disappointing come back to eclipse.. 真的很失望回到日食..
https://bugs.eclipse.org/bugs/show_bug.cgi?id=179924 https://bugs.eclipse.org/bugs/show_bug.cgi?id=179924
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.