Jenkins未能连接到gerrit存储库(Windows安装) [英] Jenkins Failed to connect to gerrit repository (Windows installation)
问题描述
我的目标:我想设置Stackoverflow和Google,但我无法解决我的问题。 up Jenkins使用git SCM通过gerrit克隆版本库主机
$ b 我的Jenkins配置
问题 配置为 IHM @ IP:/ path / to / gerrit / git / IHM.git
。 IHM
是在Windows服务器上启动Jenkins的用户。 IP
是托管gerrit的红帽服务器的地址。
凭证设置为使用用户 IHM
用ssh键直接输入。密钥是在Windows服务器上使用PuttyGen生成的。我没有在windows服务器上的配置上设置ssh密钥。 我必须这样做吗?
我有以下错误,但是我可以在用户的Windows服务器上运行命令提示符 IHM
(它向我询问密码,但后来有效)。
$ b
未能连接到存储库:命令C:\ Program
Files \Git\bin\git.exe -c core.askpass = true ls-remote -h
IHM @ IP:/ path / to / gerrit / git / IHM.git HEAD返回状态码-1:
stdout:
stderr :
我终于设法通过从零开始设置存储库。 / p>
以下是我的配置,例如其他人:
I looked around Stackoverflow and google a lot but I am not able to solve my issue.
My aim : I want to set up Jenkins to use git SCM to clone a repository host by gerrit
My Jenkins config
- Jenkins version 2.7.1 running on windows as a service
- Git plugin version 2.5.3
- Multiple SCM plugin version 0.6
- Gerrit Trigger plugin version 2.21.1
The issue
The URL is configured as IHM@IP:/path/to/gerrit/git/IHM.git
. IHM
is the user which launched Jenkins on a windows server. IP
is the adress of the red hat server hosting gerrit.
Credentials are set to use user IHM
with the ssh key enter directly. The key has been generated using PuttyGen on the windows server. I didn't set up the ssh key on a config on windows server. Do I have to do it ?
I have the following error, but I am able to run the command prompt on the windows server with user IHM
(it ask me the password but then it works).
Failed to connect to repository : Command "C:\Program Files\Git\bin\git.exe -c core.askpass=true ls-remote -h IHM@IP:/path/to/gerrit/git/IHM.git HEAD" returned status code -1:
stdout:
stderr:
I finally managed to set up the repository by setting up again from scratch.
Here is my config, for example to others:
- user = The user I used to connect to gerrit
- IP = Gerrit serveur IP adress
- Repository URL = ssh://user@IP:29418/IHM.git > Do not put the entire path
- Credentials are used with the private key generated with Putty and which public key is configure to gerrit
- Refspec = refs/changes/:refs/changes/
- Branches to build = $GERRIT_REFSPEC
这篇关于Jenkins未能连接到gerrit存储库(Windows安装)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!