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 [email protected]:iRest.git ERROR: Cause: Error performing command: /usr/local/git/ clone -o origin [email protected]: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)
Step 1: go to your GitHub repository and click on 'Settings'. Step 2: Click on Webhooks and then click on 'Add webhook'. Step 3: In the 'Payload URL' field, paste your Jenkins environment URL. At the end of this URL add /github-webhook/.
With the help of the Git plugin Jenkins can easily pull source code from any Git repository that the Jenkins build node can access. The GitHub plugin extends upon that integration further by providing improved bi-directional integration with GitHub.
Jenkins needs to have GitHub plugin installed to be able to pull code from the GitHub repository. You need not install a GitHub plugin if you have already installed the Git plugin in response to the prompt during the Jenkins' installation setup.
Install the Git Plugin in JenkinsGo to “Manage Jenkins>>Manage Plugins”, open the “Available” tab and search for “Git plugin”, click on install button wait until the installation is done.
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
.
Also you can set Git location in Jenkins server/node configuration:
goto Configure, under section Node Properties mark checkbox Tools Location and set yours path to Git.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With