title: Credentials on using Jenkins git plugin
body: <p>We have installed a Git server and Jenkins (git plugin). The install succeed. But when we configured a job for a build on Jenkins we had the following problem : </p>
  
  <pre><code>Started by user admin
  [EnvInject] - Loading node environment variables.
  Building in workspace C:\Program Files (x86)\Jenkins\jobs\HSH\workspace
  &gt; C:\Program Files (x86)\Git\bin\git.exe rev-parse --is-inside-work-tree
  Fetching changes from the remote Git repository
  &gt; C:\Program Files (x86)\Git\bin\git.exe config remote.origin.url http://localhost/Bonobo.Git.Server/HomeScreenHome.git
  Fetching upstream changes from http://localhost/Bonobo.Git.Server/HomeScreenHome.git
  &gt; C:\Program Files (x86)\Git\bin\git.exe --version
  FATAL: Failed to fetch from http://localhost/Bonobo.Git.Server/HomeScreenHome.git
  hudson.plugins.git.GitException: Failed to fetch from http://localhost/Bonobo.Git.Server/HomeScreenHome.git
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:622)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:854)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:879)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1254)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:624)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:530)
      at hudson.model.Run.execute(Run.java:1732)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:234)
  Caused by: hudson.plugins.git.GitException: Failed to connect to http://localhost/Bonobo.Git.Server/HomeScreenHome.git using credentials  (status = 502)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.checkCredentials(CliGitAPIImpl.java:2111)
  at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1151)
  at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$200(CliGitAPIImpl.java:87)
  at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:265)
  at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:620)
  ... 10 more
  </code></pre>
  
  <p>We have a git server configured with credentials and Http Url  <code>localhost/Bonobo.Git.Server/HomeScreenHome.git</code>. We have configured the Jenkins Git plugin with the Git repository url and credentials relative to the repo.</p>
  
  <p>We don't know why we have a 502 status error, and why <code>git clone</code> and <code>git fetch</code> works using git only.</p>