Jenkins setup: master + 1 slave
Master: Windows Server 2008 64-bit
Slave: Ubuntu 14.04.1 LTS x86-64
Git repositories server: GitLab 6.5.1
Repository SSH URL: git@<myserver>:test-group/my-test.git
There is "jenkins" user created in GitLab, and SSH public key generated at Ubuntu slave for that one is uploaded to user's GitLab profile.
Jenkins credentials contain entry for SSH username/public key with corresponding data for "jenkins" public key
Git client: official git client distributed via Ubuntu's package repositories
~$ git --version
git version 1.9.1
Build environment: build is restricted to be executed only on slave node. Job is configured to clone git repository from git@<myserver>:test-group/my-test.git using proper "jenkins" credentials. Build workspace is cleaned before. There are no any other build steps defined, so the expectation is to see that project sources are correctly checked out and build finishes with success status.
However, Git plugin execution is failing. See the log below:
I have figured out what are the commands that plugin issues in order to clone the repository. I combined them in the simple shell script, and ran that one as the build step. Below is the script content and resulting build output:
set +x
git --version
git init $WORKSPACE
git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
git config remote.origin.url git@<myserver>:test-group/my-test.git
# Fetching upstream changes from git@<myserver>:test-group/my-test.git
git fetch --tags git@<myserver>:test-group/my-test.git +refs/heads/*:refs/remotes/origin/*
GIT_REVISION=$(git rev-parse refs/remotes/origin/master^{commit})
echo "Checking out Revision $GIT_REVISION (refs/remotes/origin/master)"
git checkout -f $GIT_REVISION
Executing the same sequence of commands from command line of slave node is also successful, thus results in project sources checked out for the latest revision..
In meanwhile I have the opportunity to try cloning exactly the same repository in the job created at another Jenkins instance. That system details are:
Jenkins: 1.590
Git Client plugin: 1.11.1
Git plugin: 2.3
Git Parameter plugin: 0.3.2
SSH Credentials plugin: 1.10
Only master node, running Ubuntu 14.04.1 x86_64
Git client: 1.9.1
Job configuration was made pretty much the same: same repository URL, same user for GitLab access. Build was supposed only to clone repository, and no more extra steps added. Here is the result:
So far, it seems that Git Client plugin in v1.12.0 has some bug introduced, comparing to how it worked in v1.11.1; I suppose that with regard to the described problem Git plugin has nothing to do, that's why posting the issue here.
I replaced information like server names etc. due to corporative privacy concerns that I must follow.
|