Configure GitLab repository in Jenkins

I’m trying to configure Jenkins (running on Windows Server 2008) to connect to a GitLab 6.0 repository (on a linux box).

From my local windows box I can use the SSH URLs to clone the projects on my GitLab server. I’ve had some issues using the HTTP URLs, but I did manage to connect using HTTP with authentication using the Eclipse plugin.

  • On the Jenkins project config screen I have attempted:


Failed to connect to repository :

Command “d:\tools\Git\bin\git.exe ls-remote -h http://myserver.domain/mygroup/myproject.git HEAD”

returned status code 128:

stdout: stderr: error: The requested URL returned error: 504 while accessing


fatal: HTTP request failed

When I try this URL in a browser I get an authentication popup. If I enter my email & password I can successfully download the list of branches & tags.

  • …Okay, so I should be able to specify the username & password in the URL, right?



http://username:password@myserver.domain/mygroup/myproject.git/info/refs not valid: is this a git repository?

  • The Windows GUIs didn’t have any trouble using SSH.
    …Jenkins doesn’t seem to like that much though:


    The error “Please enter Git repository” still remains, and when I attempt to save the config I see the following stack trace:

    Exception: java.lang.RuntimeException: Failed to instantiate class hudson.plugins.git.GitSCM from 
     "browser":{"stapler- class":"hudson.plugins.git.browser.FisheyeGitRepositoryBrowser"}
    java.lang.RuntimeException: Failed to instantiate class hudson.plugins.git.GitSCM from {...}
    at org.kohsuke.stapler.Stapler.tryInvoke(
    Caused by: java.lang.RuntimeException: Failed to instantiate class hudson.plugins.git.GitSCM from {...}
      at hudson.model.Descriptor.newInstance(
    Caused by: java.lang.NullPointerException
      at hudson.scm.RepositoryBrowser.normalizeToEndWithSlash(
      at hudson.plugins.git.browser.FisheyeGitRepositoryBrowser.<init>(
  • I tried adding the “ssh” protocol:


Jenkins immediately reacts:

stderr: ssh: myserver.domain:mygroup: no address associated with name

fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

  • Using the jenkins CLI (on fedora 23)
  • Grunt integration with Jenkins on windows issue
  • Ivy, Ant, Jenkins - Is it good idea to to a <ivy:cleancache> on Jenkins builds?
  • Hudson: How to pass parameters to shell script
  • Upgrade SonarQube issues
  • How to update Jenkins config.xml from Java code?
  • maven deploy to tomcat cluster (multiple) in one line
  • The bucket you are attempting to access must be addressed using the specified endpoint , while uploading from jenkins to s3
  • One Solution collect form web for “Configure GitLab repository in Jenkins”

    As I commented:

    Maybe Jenkins doesn’t support the scp syntax (with ‘:‘) Try


    As mentioned in “.ssh config with amazon ec2 and git”, using ‘:‘ usually involves a ~/.ssh/config file, which resolves the string preceding the ‘:’ into a server, user, port and ssh key.

    Jenkins might understand better git@myserver.domain/mygroup/myproject.git instead of git@myserver.domain:mygroup/myproject.git.

    Git Baby is a git and github fan, let's start git clone.