it:ad:jenkins:howto:install_and_configure_the_git_plugin

IT:AD:Jenkins:HowTo:Install and Configure the Git Plugin

Instead, install the the GitHub Plugin – and you'll see that it installs the Git Plugin as a dependency.

Configure a new project, after Selecting Git, and setting the Url, you might see:

Failed to connect to repository : Error performing command: git.exe ls-remote -h https://xact@bitbucket.org/xact/gittest.git HEAD

This is due to the server not being able to Find git.exe.

This is due to the server not being able to run git.exe from the command line. Need to:

That's nice. GIT is installed, and available from the command line.

But that's not the same as Jenkins seeing it.

First thing, check that Jenkins can find it.

Go to Manage Jenkins/Configuration

There's no such executable git.exe in PATH: C:/Windows/system32, C:/Windows, C:/Windows/System32/Wbem,C:/Windows/System32/WindowsPowerShell/v1.0/, C:/Program Files/Microsoft/Web Platform Installer/, C:/Program Files/TortoiseHg/,C:/Windows/Microsoft.NET/Framework/v4.0.30319, c:/Program Files (x86)/Microsoft ASP.NET/ASP.NET Web Pages/v1.0/.

I tried several ways to add it to the PATH/ [IT:#Environment Variable]] but nothing took. Even after restarting Jenkins Service.

So just added it manually seemed to get us further along:

C:\Program Files (x86)\Git\bin\git.exe

You have two options:

  • use HTTPS/, but pass authentication with every request, or
  • set up SSH/.

Configure Authentication over HTTPS

Configuration over HTTP is not recommended as you have to send username/password with every operation.

Git recommends it (mostly due to the number of people who can't figure out how to setup SSH/

As per https://help.github.com/articles/set-up-git download onto the CI server a helper from here:

But it requires an ability to get through the firewall.

SSH Authentication

GIT/ is going to need to send Secure information to BitBucket/.

Over HTTPS/ it's secure, but not authenticated unless you add a username/password for every command.

Alternatively, you set up SSH.

  • /home/skysigal/public_html/data/pages/it/ad/jenkins/howto/install_and_configure_the_git_plugin.txt
  • Last modified: 2023/11/04 01:46
  • by 127.0.0.1