Jenkins Git Windows从站上的SSH密钥 [英] Jenkins Git SSH keys on Windows slave

查看:260
本文介绍了Jenkins Git Windows从站上的SSH密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前在Windows上有一个Jenkins master,一个ubuntu slave和一个Windows slave。我试图在Windows从站上设置git。 msysgit已安装,我将该目录包含在系统路径变量中,以便我可以在任何地方调用git.exe或git.cmd。



在我的Jenkins配置,我有一个私人SSH密钥的凭证。此凭证适用于Jenkins与Git一起使用。这适用于主节点和Linux从站。我没有把private ssh密钥放在这两台服务器中的任何一台上,Jenkins为我处理。



但是Windows的奴隶并不多。当我在windows slave上运行一个作业时,我得到的只是错误:克隆远程repo'origin'错误

我如何获得Windows从站上的凭证?或者,如果您不认为这是问题,那么我的下一个问题排查步骤是什么? 解决方案

这个错误后的消息,你可以更新你的问题,包括他们?

没有看到它们,我只能怀疑你的Windows从属的git找不到 .ssh 文件夹(该文件夹包含您的密钥)。



您是否已阅读 Git插件页面


We currently have a Jenkins master on Windows, an ubuntu slave, and a Windows slave. I'm trying to set up git on the Windows slave. msysgit is installed, and I included the directory in the system path variable so that I can call "git.exe" or "git.cmd" anywhere.

In my Jenkins configuration, I have a credential with a private SSH key. This credential is for Jenkins to use with Git. This works on the master node and the linux slave. I did not put the private ssh key on either of those two servers, Jenkins handled it for me.

But the Windows slave, not so much. When I run a job on the windows slave, all I get is ERROR: Error cloning remote repo 'origin'.

How can I get the credential working on the Windows slave? Or, if you don't think that's the issue, what would be my next troubleshooting steps?

解决方案

If you seen any other messages after this error, could you update your question to include them?

Without seeing them, I can only suspect that git on your Windows slave cannot find the .ssh folder (this folder contains your keys).

Have you already looked at the notes on the Git Plugin page?

这篇关于Jenkins Git Windows从站上的SSH密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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