詹金斯和git与自定义端口

时间:2017-02-02 13:39:21

标签: jenkins gitlab

我正在尝试将 gitlab 实例与Jenkins实例相关联。由于在DC / OS环境中运行,我无法使用标准SSH端口22,因此我在SSH端口16122上运行 gitlab

Gitlab [git@git.company.de:16122]:user/test.git格式显示SSH克隆网址,这是普通git clone命令所理解的。此外,Jenkins在配置屏幕中接受此URI作为SCM URI(一旦我将SSH密钥设置为在 Gitlab 中配置为deploy-key的凭证,错误消息“无效凭据”就会消失。

在实际构建工作期间出现问题:jenkins出于某种未知原因决定对URI前面的[进行双重编码,从而构建中断:

Cloning repository %255bgit@git.company.de:16122]:user/test.git
 > git init /var/jenkins_home/workspace/test # timeout=10
Fetching upstream changes from %25255bgit@git.company.de:16122]:user/test.git
 > git --version # timeout=10
 > git fetch --tags --progress %25255bgit@git.company.de:16122]:user/test.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --tags --progress %25255bgit@git.company.de:16122]:user/test.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:

当我在shell上使用xxd查看作业的原始XML时,repo URL前面没有“不可见”的ASCII字符或类似字符。

是什么导致这种情况,有没有办法解决这个问题,而无需手动将每个网址重写为ssh://git@git.company.de:16122/user/test.git

0 个答案:

没有答案
相关问题