Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git与Jenkins的集成_Git_Jenkins_Jenkins Plugins - Fatal编程技术网

Git与Jenkins的集成

Git与Jenkins的集成,git,jenkins,jenkins-plugins,Git,Jenkins,Jenkins Plugins,我正在创建詹金斯管道 但在管道中,当我选择Git并给出存储库时,它会给我以下错误 无法连接到存储库:执行命令时出错:git ls remote-h 头 我已经在gobal凭据中添加了我的git凭据,但仍然不确定它抛出此错误的原因 下面是我的管道 node { stage 'Checkout' git 'git@github.com:trushant-dw/dockerwebapp.git' stage 'Docker build' docker.b

我正在创建詹金斯管道

但在管道中,当我选择Git并给出存储库时,它会给我以下错误

无法连接到存储库:执行命令时出错:git ls remote-h 头

我已经在gobal凭据中添加了我的git凭据,但仍然不确定它抛出此错误的原因

下面是我的管道

node {
    stage 'Checkout'
        git 'git@github.com:trushant-dw/dockerwebapp.git'
    stage 'Docker build'
        docker.build('demo-docker')
    stage 'Docker push'
        docker.withRegistry('https://944198216610.dkr.ecr.us-east- 
        1.amazonaws.com', 'ecr:us-east-1:demo-ecr-credentials') {
            docker.image('demo').push('latest')
        }
}

我在jenkins服务器上安装了git

$yum安装git
美元多少吉特
/usr/lib/git

然后在Manage Jenkins-->Global config tools-->Git中,我添加了路径。它对我很有效。

请发布一个管道示例。@Dibakar在原始帖子中添加了pipline