Jenkins未能连接到gerrit存储库(Windows安装) [英] Jenkins Failed to connect to gerrit repository (Windows installation)

查看:559
本文介绍了Jenkins未能连接到gerrit存储库(Windows安装)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的目标:我想设置Stackoverflow和Google,但我无法解决我的问题。 up Jenkins使用git SCM通过gerrit克隆版本库主机


$ b 我的Jenkins配置




  • $ j $ b

  • SCM插件版本0.6

  • Gerrit Trigger插件版本2.21.1


    问题 配置为 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>

    以下是我的配置,例如其他人:


    • 用户 =我曾经连接到gerrit的用户

    • IP = Gerrit serveur IP地址
    • >存储库URL = ssh:// 用户 @ IP :29418 / IHM.git>请勿p ut整个路径
    • 凭证与Putty生成的私钥一起使用,并且公钥被配置为gerrit

    • Refspec = refs / changes / :refs / changes /

    • 分支构建 = $ GERRIT_REFSPEC


    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. IHMis the user which launched Jenkins on a windows server. IPis 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屋!

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