在Jenkins作业中将gitlab repo配置为SCM

时间:2014-10-02 11:17:31

标签: git jenkins

Source Code Management下,我选择了Git并指定了以下URL

Repository URL: https://gitlab.com/team/repo.git
Failed to connect to repository: Received fatal alert: handshake_failure

[rob@client ~]$ git ls-remote -h git@gitlab.com:team/repo.git HEAD
[rob@client ~]$ 

为什么我收到handshake_failure

1 个答案:

答案 0 :(得分:0)

我最终得到了这个,确保你的jenkins用户可以访问你的gitlab repo。

例如,将ssh密钥上传到gitlab,然后您就可以从jenkins克隆了。

Started by user anonymous
Building in workspace /home/rob/.jenkins/jobs/Test/workspace
Cloning the remote Git repository
Cloning repository git@gitlab.com:team/repo.git
 > git init /home/rob/.jenkins/jobs/Test/workspace # timeout=10
Fetching upstream changes from git@gitlab.com:team/repo.git
 > git --version # timeout=10
 > git fetch --tags --progress git@gitlab.com:team/repo.git +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git@gitlab.com:team/repo.git # timeout=10
 > git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url git@gitlab.com:team/repo.git # timeout=10
Fetching upstream changes from git@gitlab.com:team/repo.git
 > git fetch --tags --progress git@gitlab.com:team/repo.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 73c78ce6b86711b24aca184fcaa796e00a7a1ece (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 73c78ce6b86711b24aca184fcaa796e00a7a1ece
First time build. Skipping changelog.
Finished: SUCCESS