# Configure git constants
With Jenkins server ( http://jenkins-ci.org/ ) running on an Ubuntu LTS 12.04, and attempts poll on a Gitlab ( http://gitlab.org ) server, you will find that Jenkins is not allowed to poll or clone from the Gitlab server.There are 2 issues, The git version on Ubuntu is below Gitlab's requirements, and the Jenkins service user does not have an ssh key. Here comes a recipe for fixing.
This Ubuntu LTS version uses git version 1.7.x but gitlabhq expects version 1.8.x.
To upgrade git version on jenkins server - well on ubuntu LTS 12.04...
Then we need to create a ssh key for the service user Jenkins user. We do not know the password, which was generated by the install. The following command allow us to be user jenkins, without knowing the password:
As user jenkins:
# Create a key for jenkins
# show the key, copy it to your Gitlab server for the user created for polling
# Have gitlab hosts key added to known hosts - and test that jenkins now can clone from Gitlab