Jenkins could not run git

前端 未结 15 1268
臣服心动
臣服心动 2020-12-29 01:22

I\'ve installed Jenkins on my mac (osx lion). But I couldn\'t get it work. This is the stacktrace I\'ve got:

Started by user anonymous

Checkout:workspace /          


        
相关标签:
15条回答
  • 2020-12-29 02:04

    Environment:Linux Error: "jenkins Failed to connect to repository : Error performing command: git ls-remote -h"

    Solution : if repository URL and credential configured correctly ,problem on git installion and config a) make sure git installed on your linux machine. if git not installed , install it ("sudo yum install git") b) Goto to -> Manage Jenkins -> Global Tool Configuration ->Git->Path to Git executable make sure "git" command present.

    0 讨论(0)
  • 2020-12-29 02:06

    I had a similar problem finding the git executable on OS X.

    I had to change my Path to Git executable to : /usr/local/git/bin/git

    Might give that a shot if you are still stuck.

    0 讨论(0)
  • 2020-12-29 02:09

    The solution for me was to set the git path in the Manage Jenkins > Global Tool Configuration settings. In the Git section, I changed the Path to Git executable to /usr/local/bin/git.

    0 讨论(0)
  • 2020-12-29 02:10

    Like Darksaint2014 said, you need to configure two parts if you installed Jenkins in Windows.

    If you installed your Jenkins in windows, you need to install Git in both local and your linux server, then configure below in both locations:


    Global tool configuration:


    For server side:


    0 讨论(0)
  • 2020-12-29 02:14

    Please install git in your Jenkins server. For example, if you are using Red Hat Enterprise Linux where you are hosting Jenkins, then install git in that server using the following command: sudo yum install git This should solve the problem as git executable will be available in /usr/bin/git then and this will be recognized automatically by jenkins and this you can verify by navigating to Manage Jenkins --> Global Tool Configuration. Then under Git installations, there will not be any warning and now you should be able to clone your git project in jenkins. Hope this help the users.

    0 讨论(0)
  • 2020-12-29 02:14

    For Jenkins 2.121.3 version, Go to Manage jenkins -> Global tool configuration -> Git installations -> Path to Git executable: C:\Program Files\Git\bin\git.exe It works!

    In Jenkins, give the http URL. SSH URL shows similar error.

    0 讨论(0)
提交回复
热议问题