简体   繁体   中英

Jenkins Git integration issue

Installed Jenkins, Git plugin (window platform), then I will create a new item (maven project) in Jenkins.

While configure the git I'm getting the error

Project- Configure – Source code management – git Enter the repository url : https://github.com/zzzz/Sample.git

Getting below error

Failed to connect to repository : Error performing command: git.exe ls-remote -h https://github.com/zzzz/Sample.git HEAD

Jenkins – Manage Jenkins –configure system

git

Path to Git executable = git.exe In this section getting the below error

    There's no such executable git.exe in PATH: C:/ProgramData/Oracle/Java/javapath, C:/Windows/system32, C:/Windows, C:/Windows/System32/Wbem, C:/Windows/System32/WindowsPowerShell/v1.0/, C:/Program Files/Microsoft SQL Server/100/Tools/Binn/,
 C:/Program Files/Microsoft SQL Server/100/DTS/Binn/, C:/Program Files/Microsoft SQL Server/100/Tools/Binn/VSShell/Common7/IDE/, C:/Program Files/Microsoft SQL Server/110/Tools/Binn/ManagementStudio/, C:/Program Files/Microsoft SQL Server/110/Tools/Binn/, C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/, C:/Program Files/Microsoft SQL Server/110/DTS/Binn/,  C:/Program Files/Java/bin, %M2_HOME%/bin, C:/Program Files/glassfish-4.0/bin.

Please help me to resolve.

For me it looks like, you don't have the Path, where git is installed in your Windows Path, so jenkins doesnt find git.exe . To resolve, you should look for your git installation and add the folder with git.exe inside to System path.

Go to Manage Jenkins > Global Tools Configuration .

Reconfigure your git executable path. Find the path where git is installed on your local machine and add this path upto the git.exe file in the required input field..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM