詹金斯无法运行 git [英] Jenkins could not run git

查看:34
本文介绍了詹金斯无法运行 git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的 mac (osx lion) 上安装了 Jenkins.但我无法让它工作.这是我得到的堆栈跟踪:

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 / /Users/Shared/Jenkins/Home/jobs/test/workspace - hudson.remoting.LocalChannel@1c0a0847
Using strategy: Default
Checkout:workspace / /Users/Shared/Jenkins/Home/jobs/test/workspace - hudson.remoting.LocalChannel@1c0a0847
Cloning the remote Git repository
Cloning repository origin
Error trying to determine the git version: Error performing command: /usr/local/git/ --version
Cannot run program "/usr/local/git/" (in directory "/Users/Shared/Jenkins/Home/jobs/test/workspace"): error=13, Permission denied
Assuming 1.6
ERROR: Error cloning remote repo 'origin' : Could not clone git@coding-squirrel.de:iRest.git
ERROR: Cause: Error performing command: /usr/local/git/ clone -o origin git@coding-squirrel.de:iRest.git /Users/Shared/Jenkins/Home/jobs/test/workspace
Cannot run program "/usr/local/git/": error=13, Permission denied
Trying next repository
ERROR: Could not clone repository
FATAL: Could not clone
hudson.plugins.git.GitException: Could not clone
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1046)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:972)
    at hudson.FilePath.act(FilePath.java:783)
    at hudson.FilePath.act(FilePath.java:765)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:972)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1195)
    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:571)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:460)
    at hudson.model.Run.run(Run.java:1404)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:238)

推荐答案

我的解决方案是在 Manage Jenkins > Global Tool Configuration 设置中设置 git 路径.在 Git 部分,我将 Path to Git executable 更改为 /usr/local/bin/git.

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.

这篇关于詹金斯无法运行 git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆