Hudson Git Plugin not working on windows

那年仲夏 提交于 2019-11-27 04:46:01

问题


I have msysgit installed with OpenSSH option. In Git bash, I can run ssh-agent, and it manages the passphrase for my ssh key. Is it possible for the Hudson Git plugin to use ssh-agent? Currently, it hangs when trying to clone, no doubt waiting for the passphrase to be entered.

Thanks!


回答1:


As mentioned in "Problem with Hudson + Git + Gitosis on windows", you need to make sure the Hudson job does set first a %HOME% environment variable.
That value must refer to the directory where you can find:

.ssh
  id_rsa     # private key
  id_rsa.pub # public key



回答2:


I've just had this exact same problem but in my case setting HOME didn't fix it!

In my case the fix was actually to set the HOMEDRIVE and HOMEPATH variables so it would seem that different Windows Git builds (mine is version 1.8.1.msysgit.1) use different environment variables to locate SSH keys.

If in doubt, make sure you configure Hudson with all three!

Note also that you can configure Hudson-wide environment variables under 'Manage Hudson' > 'Configure System' > 'Global Properties', so you don't need to do this for each job individually.



来源:https://stackoverflow.com/questions/3188710/hudson-git-plugin-not-working-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!