Mac Jenkins Can't Clone/fetch from GitHub

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Mac Jenkins Can't Clone/fetch from GitHub

Hung
HI,  I am new to setting up Jenkins.  I am trying to setup a Jenkins server on a Mac Mini.  I am having trouble with the Jenkins setup because I made a simple project that is to sync to a github repo and then run a script.  Unfortunately I can't get this simple project to run correctly.  I keep getting a timeout error.  Here is a Console output.

 15:16:57 Building in workspace /Users/Shared/Jenkins/Home/workspace/MacWitchesServers
15:16:57  > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
15:16:57 Fetching changes from the remote Git repository
15:16:57  > /usr/bin/git config remote.origin.url https://github.com/MyAccount/sample # timeout=10
15:16:57 Fetching upstream changes from https://github.com/MyAccount/sample
15:16:57  > /usr/bin/git --version # timeout=10
15:16:57 using GIT_ASKPASS to set credentials
15:16:57  > /usr/bin/git fetch --tags --progress https://github.com/MyAccount/sample +refs/heads/*:refs/remotes/origin/*
15:26:57 ERROR: Timeout after 10 minutes
15:26:57 ERROR: Error fetching remote repo 'origin'
15:26:57 hudson.plugins.git.GitException: Failed to fetch from https://github.com/MyAccount/sample
15:26:57 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
15:26:57 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1051)
15:26:57 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1082)
15:26:57 at hudson.scm.SCM.checkout(SCM.java:495)
15:26:57 at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
15:26:57 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
15:26:57 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
15:26:57 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
15:26:57 at hudson.model.Run.execute(Run.java:1741)
15:26:57 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
15:26:57 at hudson.model.ResourceController.execute(ResourceController.java:98)
15:26:57 at hudson.model.Executor.run(Executor.java:410)
15:26:57 Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git fetch --tags --progress https://github.com/MyAccount/sample +refs/heads/*:refs/remotes/origin/*" returned status code 143:
15:26:57 stdout:
15:26:57 stderr:
15:26:57 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1752)
15:26:57 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1495)
15:26:57 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
15:26:57 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
15:26:57 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:795)
15:26:57 ... 11 more
15:26:57 ERROR: null

I su jenkins and did a manual git fetch and there was no issue.  Do anyone know where I am going wrong.  I did a normal installation of jenkins and selected plugin related to github.

I am running Jenkins ver. 2.7.4

Thank you for any help, and I stuck at this point.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Mark Waite-2
That looks like the problem may be that you didn't assign credentials to the job or that you assigned ssh credentials to a repository that uses https, and you're trying to clone a private repository.

However, you may want to try a series of small experiments to see which area has the problem.  Some of the experiments you might try include:

- Create a Jenkins job which clones a publicly accessible sample project over https (like https://github.com/skeeto/sample-java-project.git ), confirm it works
- Create a Jenkins job which clones your private repo over ssh (like [hidden email]) using ssh private key credentials added using the "Add" button
- Add a username / password credential to the job trying to clone your repository (the output hints you may have tried using a public key, but public keys only work with ssh access, not with https access)

Mark Waite

On Fri, Sep 16, 2016 at 3:41 PM Hung <[hidden email]> wrote:
HI,  I am new to setting up Jenkins.  I am trying to setup a Jenkins server
on a Mac Mini.  I am having trouble with the Jenkins setup because I made a
simple project that is to sync to a github repo and then run a script.
Unfortunately I can't get this simple project to run correctly.  I keep
getting a timeout error.  Here is a Console output.

 15:16:57 Building in workspace
/Users/Shared/Jenkins/Home/workspace/MacWitchesServers
15:16:57  > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
15:16:57 Fetching changes from the remote Git repository
15:16:57  > /usr/bin/git config remote.origin.url
https://github.com/MyAccount/sample # timeout=10
15:16:57 Fetching upstream changes from https://github.com/MyAccount/sample
15:16:57  > /usr/bin/git --version # timeout=10
15:16:57 using GIT_ASKPASS to set credentials
15:16:57  > /usr/bin/git fetch --tags --progress
https://github.com/MyAccount/sample +refs/heads/*:refs/remotes/origin/*
15:26:57 ERROR: Timeout after 10 minutes
15:26:57 ERROR: Error fetching remote repo 'origin'
15:26:57 hudson.plugins.git.GitException: Failed to fetch from
https://github.com/MyAccount/sample
15:26:57        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
15:26:57        at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1051)
15:26:57        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1082)
15:26:57        at hudson.scm.SCM.checkout(SCM.java:495)
15:26:57        at
hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
15:26:57        at
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
15:26:57        at
jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
15:26:57        at
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
15:26:57        at hudson.model.Run.execute(Run.java:1741)
15:26:57        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
15:26:57        at
hudson.model.ResourceController.execute(ResourceController.java:98)
15:26:57        at hudson.model.Executor.run(Executor.java:410)
15:26:57 Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git
fetch --tags --progress https://github.com/MyAccount/sample
+refs/heads/*:refs/remotes/origin/*" returned status code 143:
15:26:57 stdout:
15:26:57 stderr:
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1752)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1495)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
15:26:57        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:795)
15:26:57        ... 11 more
15:26:57 ERROR: null

I su jenkins and did a manual git fetch and there was no issue.  Do anyone
know where I am going wrong.  I did a normal installation of jenkins and
selected plugin related to github.

I am running Jenkins ver. 2.7.4

Thank you for any help, and I stuck at this point.



--
View this message in context: http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html
Sent from the Jenkins users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEx2enoX9i4Q0dUyKH0krphjixoEp-%3DRbfAWxKdUQ8JTQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Hung
Hi Mark,

Thank for for your reply and help.  I tried the public repo and I was able to download just find.  So it does look like it is the credentials.  My environment block ssh incoming and out going so I can't use ssh as a way to access the private repo.

I am currently using username and password in the configuration.  That seems to not be working here.  Any clues?  Is there a pluggin I am not using correctly?  I have a Centos machine that was previously setup on a Jenkin that works have these differences.

I am seeing this in the console output, "using GIT_ASKPASS to set credentials", while the Centos one we have this, "using .gitcredentials to set credentials"

I was searching the net and saw documentation on GIT_ASKPASS require input from users, could it be timing out because it is not passing the data to the GIT_ASKPASS?

How can I setup my Jenkins to use .gitcredentials instead of GIT_ASKPASS?

Thanks again for any help.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Mark Waite-2
The git plugin switched from using .gitcredentials to using GIT_ASKPASS with the git plugin 3.0 release (and the git client plugin 2.0 release).  That change was needed so that we could support authenticated submodules.

If you're willing to explore, you could download the older plugin versions (git plugin 2.6.0 and git client plugin 1.21.0) and use the advanced tab in the plugin manager to install them.

The timeout in the plugin might be because command line git is waiting for ssh to satisfy the prompt.  However, since you're using https, it should not be invoking the ssh authentication.  Are you absolutely certain that you created a username and password credential rather than an ssh private key based credential?

Mark Waite

On Fri, Sep 16, 2016 at 7:48 PM Hung <[hidden email]> wrote:
Hi Mark,

Thank for for your reply and help.  I tried the public repo and I was able
to download just find.  So it does look like it is the credentials.  My
environment block ssh incoming and out going so I can't use ssh as a way to
access the private repo.

I am currently using username and password in the configuration.  That seems
to not be working here.  Any clues?  Is there a pluggin I am not using
correctly?  I have a Centos machine that was previously setup on a Jenkin
that works have these differences.

I am seeing this in the console output, "using GIT_ASKPASS to set
credentials", while the Centos one we have this, "using .gitcredentials to
set credentials"

I was searching the net and saw documentation on GIT_ASKPASS require input
from users, could it be timing out because it is not passing the data to the
GIT_ASKPASS?

How can I setup my Jenkins to use .gitcredentials instead of GIT_ASKPASS?

Thanks again for any help.



--
View this message in context: http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626p4842693.html
Sent from the Jenkins users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1474080231887-4842693.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtGimQQiF67sVPO-msKRCcsbmtxkF1D1xd8sUnUd6K7GCA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Hung
Thanks, I will try to see if I can this to work a little more before trying to install older version of git.  I didn't any setting for me to choose https or ssh.  I just added the credentials in the SCM location when i added my repo.  I chose username and password and provided both.  Here is image of the credential in the Jenkins Credential Tab.



If there is a location in the Jenkins to say use https or ssh, please let me know.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Mark Waite-2
You need a credential that looks like this ->

github-username-password.png

You don't want a credential that looks like this ->
github-rsa-private-key.png

Mark Waite

On Fri, Sep 16, 2016 at 8:33 PM Hung <[hidden email]> wrote:
Thanks, I will try to see if I can this to work a little more before trying
to install older version of git.  I didn't any setting for me to choose
https or ssh.  I just added the credentials in the SCM location when i added
my repo.  I chose username and password and provided both.  Here is image of
the credential in the Jenkins Credential Tab.

<http://jenkins-ci.361315.n4.nabble.com/file/n4842697/Screen_Shot_2016-09-16_at_8.png>

If there is a location in the Jenkins to say use https or ssh, please let me
know.



--
View this message in context: http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626p4842697.html
Sent from the Jenkins users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1474082919062-4842697.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtHsW4L72dfreaMwTohfpnyNowga6DHdXisRChsFW7bcCA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Hung
I have the first, username and password.  I didn't do an id or description, is that bad?
I will try to add another one to see if maybe I type something wrong.  

I though everything was good because when I had wrong data I get a big red warning that it couldn't authenticate.

This is unfortunate as I was hoping I did something wrong.  I guess I have to try and install older version.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Mark Waite-2
No, there is no requirement for an id or a description.  If you're using a username and password, then (as far as I can tell) you should be ok.

Is the version of command line git running on your MacOS machine at least 1.7.10?

Mark Waite

On Fri, Sep 16, 2016 at 9:33 PM Hung <[hidden email]> wrote:
I have the first, username and password.  I didn't do an id or description,
is that bad?
I will try to add another one to see if maybe I type something wrong.

I though everything was good because when I had wrong data I get a big red
warning that it couldn't authenticate.

This is unfortunate as I was hoping I did something wrong.  I guess I have
to try and install older version.



--
View this message in context: http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626p4842700.html
Sent from the Jenkins users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1474086530838-4842700.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtF8Nf7C%2BivHWoLue7OdsGj03fCNpUd2ectAcyhnS1yBew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Hung
This post was updated on .
Yes, it is running Apple git 1.9.5, with Git LFS installed.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Hung
So I installed the older pluggin you link, and I am still having the same issue.  The log still show askpass is being used.

Here is the Centos Jenkin that is working log of the git call

11:40:14 using .gitcredentials to set credentials
11:40:14  > git config --local credential.helper store --file=/tmp/git6774799234765831045.credentials # timeout=10
11:40:14  > git fetch --tags --progress https://github.com/MyAccount/Sample +refs/heads/*:refs/remotes/origin/*
11:40:20  > git config --local --remove-section credential # timeout=10
11:40:20  > git rev-parse refs/remotes/origin/dev^{commit} # timeout=10
11:40:20  > git rev-parse refs/remotes/origin/origin/dev^{commit} # timeout=10
11:40:20 Checking out Revision 736768d34c48a7078b6330d8777d2c252291f961 (refs/remotes/origin/dev)
11:40:20  > git config core.sparsecheckout # timeout=10
11:40:20  > git checkout -f 736768d34c48a7078b6330d8777d2c252291f961
11:40:21  > git rev-list 736768d34c48a7078b6330d8777d2c252291f961 # timeout=10
11:40:26 [workspace] $ /bin/sh -xe /tmp/hudson8706993192070172306.sh

Here is my Mac Jenkins logs

23:36:55 using .gitcredentials to set credentials
23:36:55  > /usr/bin/git config --local credential.username jenkins-builder # timeout=10
23:36:55  > /usr/bin/git config --local credential.helper store --file=/Users/Shared/Jenkins/tmp/git5395379929780946755.credentials # timeout=10
23:36:55  > /usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/MyAccount/Sample +refs/heads/*:refs/remotes/origin/*
23:46:55 ERROR: Timeout after 10 minutes
23:46:55  > /usr/bin/git config --local --remove-section credential # timeout=10
23:46:55 ERROR: Error fetching remote repo 'origin'
23:46:55 hudson.plugins.git.GitException: Failed to fetch from https://github.com/MyAccount/Sample
23:46:55 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:799)
23:46:55 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1055)
23:46:55 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1086)
23:46:55 at hudson.scm.SCM.checkout(SCM.java:495)
23:46:55 at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
23:46:55 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
23:46:55 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
23:46:55 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
23:46:55 at hudson.model.Run.execute(Run.java:1741)
23:46:55 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
23:46:55 at hudson.model.ResourceController.execute(ResourceController.java:98)
23:46:55 at hudson.model.Executor.run(Executor.java:410)
23:46:55 Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/MyAccount/Sample +refs/heads/*:refs/remotes/origin/*" returned status code 143:
23:46:55 stdout:
23:46:55 stderr: error: git-credential-osxkeychain died of signal 15
23:46:55
23:46:55 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1740)
23:46:55 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1476)
23:46:55 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63)
23:46:55 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314)
23:46:55 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
23:46:55 ... 11 more
23:46:55 ERROR: null


This is a little different than the first error as it report an error :
     stderr: error: git-credential-osxkeychain died of signal 15

Anyone know what this error means?  Do I need to have a jenkins account on my mac?
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Ankit Arora
In reply to this post by Hung
Hi,

I am also getting Error while Connecting Jenkins from Github.

Error : Failed to connect to repository : Error performing command: git.exe ls-remote -h

Please suggest the solution

//BR

Ankit Arora
Test Engineer  

✉ : [hidden email] || [hidden email]
☎ :
 
+91-9654293205 ,+91-8285678798

P please consider the environment before printing any email    

Please say "No" to Plastics



 


On Sat, Sep 17, 2016 at 4:06 AM, Hung <[hidden email]> wrote:
HI,  I am new to setting up Jenkins.  I am trying to setup a Jenkins server
on a Mac Mini.  I am having trouble with the Jenkins setup because I made a
simple project that is to sync to a github repo and then run a script.
Unfortunately I can't get this simple project to run correctly.  I keep
getting a timeout error.  Here is a Console output.

 15:16:57 Building in workspace
/Users/Shared/Jenkins/Home/workspace/MacWitchesServers
15:16:57  > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
15:16:57 Fetching changes from the remote Git repository
15:16:57  > /usr/bin/git config remote.origin.url
https://github.com/MyAccount/sample # timeout=10
15:16:57 Fetching upstream changes from https://github.com/MyAccount/sample
15:16:57  > /usr/bin/git --version # timeout=10
15:16:57 using GIT_ASKPASS to set credentials
15:16:57  > /usr/bin/git fetch --tags --progress
https://github.com/MyAccount/sample +refs/heads/*:refs/remotes/origin/*
15:26:57 ERROR: Timeout after 10 minutes
15:26:57 ERROR: Error fetching remote repo 'origin'
15:26:57 hudson.plugins.git.GitException: Failed to fetch from
https://github.com/MyAccount/sample
15:26:57        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
15:26:57        at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1051)
15:26:57        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1082)
15:26:57        at hudson.scm.SCM.checkout(SCM.java:495)
15:26:57        at
hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
15:26:57        at
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
15:26:57        at
jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
15:26:57        at
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
15:26:57        at hudson.model.Run.execute(Run.java:1741)
15:26:57        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
15:26:57        at
hudson.model.ResourceController.execute(ResourceController.java:98)
15:26:57        at hudson.model.Executor.run(Executor.java:410)
15:26:57 Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git
fetch --tags --progress https://github.com/MyAccount/sample
+refs/heads/*:refs/remotes/origin/*" returned status code 143:
15:26:57 stdout:
15:26:57 stderr:
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1752)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1495)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
15:26:57        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:795)
15:26:57        ... 11 more
15:26:57 ERROR: null

I su jenkins and did a manual git fetch and there was no issue.  Do anyone
know where I am going wrong.  I did a normal installation of jenkins and
selected plugin related to github.

I am running Jenkins ver. 2.7.4

Thank you for any help, and I stuck at this point.



--
View this message in context: http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html
Sent from the Jenkins users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CACCbP2ToaM%2B8192TiBg5Q7cgW5fbdDcQ-GJFFUV%3DGixWTyuDmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Hung
This post was updated on .
In reply to this post by Hung
Hi,

So I install Jenkins on another mac, this one using my home network with no firewalls.  I still can't get it to work.  Here is my log, also using the older git plugin, here is the log, different error but still unable to process git request.

using .gitcredentials to set credentials
 > git config --local credential.username voltage-builder # timeout=10
 > git config --local credential.helper store --file=/Users/Shared/Jenkins/tmp/git3983407691039161185.credentials # timeout=10
 > git -c core.askpass=true fetch --tags --progress https://github.com/MyAccount/Sample +refs/heads/*:refs/remotes/origin/*
ERROR: Timeout after 10 minutes
 > git config --local --remove-section credential # timeout=10
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://github.com/MyAccount/Sample
        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:799)
        at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1055)
        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1086)
        at hudson.scm.SCM.checkout(SCM.java:495)
        at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
        at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
        at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
        at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
        at hudson.model.Run.execute(Run.java:1741)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
        at hudson.model.ResourceController.execute(ResourceController.java:98)
        at hudson.model.Executor.run(Executor.java:410)
Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress https://github.com/MyAccount/Sample +refs/heads/*:refs/remotes/origin/*" returned status code 143:
stdout:
stderr:
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1740)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1476)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314)
        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
        ... 11 more
ERROR: null
Finished: FAILURE

Anyone gotten Jenkins to work with Mac and Git before?  If so can you let me know the step you did to get it working?

Here was my step,

Download Jenkins, run the install.

Install the plugin from Manage Plugin
Make a project, add credentials.
Run project.

Are there steps I am missing?  Thanks

Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Hung
Well,

I have an update.  I am not sure this is as intended but here is what I had to do to get Jenkins working on my machine.

I had to make the jenkins user a login able user.  When I su jenkins to see what was happening with git, I notice we kept getting an error in the keychain saying it had no keychain to store, so we finally found a way to turn jenkins into a log able account.  

I would love to tell you how I did it, but I kind of fumble around and I finally saw that I could switch user to jenkins and I did.  Once I did that the Mac made a keychain for jenkins and then I was able to pass the git portion.

When I get time to try and do it again on another Mac, I will try to record all the stuff we tried to turn jenkins into a log able account.   If someone already knows how would be great for someone to post that info here.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Jenkins users mailing list
In reply to this post by Ankit Arora
Hey, this is because Jenkins is running as the user jenkins, which is not the current user on your mac.

The default path is "/User/Share/Jenkins", install it under "$HOME/.jenkins" to make it work.
So:


1. Stop the current Jenkin on your mac.
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist

The, double check you can't access "localhost:8080" 

2.  Double click the "jenkins.war" file under "Application/jenkins". You will found jenkins
was reinstalled to "$HOME/.jenkins" again. 

3. Then re-config the job, git should works well

I also encounter this issue, and above steps works well for me.

On Monday, September 19, 2016 at 3:35:05 PM UTC+8, Ankit Arora wrote:
Hi,

I am also getting Error while Connecting Jenkins from Github.

Error : Failed to connect to repository : Error performing command: git.exe ls-remote -h

Please suggest the solution

//BR

Ankit Arora
Test Engineer  

✉ : [hidden email] || [hidden email]
☎ :
 
+91-9654293205 ,+91-8285678798

P please consider the environment before printing any email    

Please say "No" to Plastics



 


On Sat, Sep 17, 2016 at 4:06 AM, Hung <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Rbw9z5LdBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">hung....@...> wrote:
HI,  I am new to setting up Jenkins.  I am trying to setup a Jenkins server
on a Mac Mini.  I am having trouble with the Jenkins setup because I made a
simple project that is to sync to a github repo and then run a script.
Unfortunately I can't get this simple project to run correctly.  I keep
getting a timeout error.  Here is a Console output.

 15:16:57 Building in workspace
/Users/Shared/Jenkins/Home/workspace/MacWitchesServers
15:16:57  > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
15:16:57 Fetching changes from the remote Git repository
15:16:57  > /usr/bin/git config remote.origin.url
<a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample # timeout=10
15:16:57 Fetching upstream changes from <a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample
15:16:57  > /usr/bin/git --version # timeout=10
15:16:57 using GIT_ASKPASS to set credentials
15:16:57  > /usr/bin/git fetch --tags --progress
<a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample +refs/heads/*:refs/remotes/origin/*
15:26:57 ERROR: Timeout after 10 minutes
15:26:57 ERROR: Error fetching remote repo 'origin'
15:26:57 hudson.plugins.git.GitException: Failed to fetch from
<a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample
15:26:57        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
15:26:57        at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1051)
15:26:57        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1082)
15:26:57        at hudson.scm.SCM.checkout(SCM.java:495)
15:26:57        at
hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
15:26:57        at
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
15:26:57        at
jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
15:26:57        at
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
15:26:57        at hudson.model.Run.execute(Run.java:1741)
15:26:57        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
15:26:57        at
hudson.model.ResourceController.execute(ResourceController.java:98)
15:26:57        at hudson.model.Executor.run(Executor.java:410)
15:26:57 Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git
fetch --tags --progress <a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample
+refs/heads/*:refs/remotes/origin/*" returned status code 143:
15:26:57 stdout:
15:26:57 stderr:
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1752)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1495)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
15:26:57        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:795)
15:26:57        ... 11 more
15:26:57 ERROR: null

I su jenkins and did a manual git fetch and there was no issue.  Do anyone
know where I am going wrong.  I did a normal installation of jenkins and
selected plugin related to github.

I am running Jenkins ver. 2.7.4

Thank you for any help, and I stuck at this point.



--
View this message in context: <a href="http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjenkins-ci.361315.n4.nabble.com%2FMac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHLeO3gHxgf_F_sX5m4P9GZwPKaaQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjenkins-ci.361315.n4.nabble.com%2FMac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHLeO3gHxgf_F_sX5m4P9GZwPKaaQ&#39;;return true;">http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html
Sent from the Jenkins users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="Rbw9z5LdBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/77ea51d5-9a8a-4a28-87dc-0fee44b05fe5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Hải Châu Nguyễn Phạm
Thank you so much! You saved my day.

On Wednesday, May 24, 2017 at 10:00:20 AM UTC+7, Shuguo Yang wrote:
Hey, this is because Jenkins is running as the user jenkins, which is not the current user on your mac.

The default path is "/User/Share/Jenkins", install it under "$HOME/.jenkins" to make it work.
So:


1. Stop the current Jenkin on your mac.
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist

The, double check you can't access "localhost:8080" 

2.  Double click the "jenkins.war" file under "Application/jenkins". You will found jenkins
was reinstalled to "$HOME/.jenkins" again. 

3. Then re-config the job, git should works well

I also encounter this issue, and above steps works well for me.

On Monday, September 19, 2016 at 3:35:05 PM UTC+8, Ankit Arora wrote:
Hi,

I am also getting Error while Connecting Jenkins from Github.

Error : Failed to connect to repository : Error performing command: git.exe ls-remote -h

Please suggest the solution

//BR

Ankit Arora
Test Engineer  

✉ : [hidden email] || [hidden email]
☎ :
 
+91-9654293205 ,+91-8285678798

P please consider the environment before printing any email    

Please say "No" to Plastics



 


On Sat, Sep 17, 2016 at 4:06 AM, Hung <[hidden email]> wrote:
HI,  I am new to setting up Jenkins.  I am trying to setup a Jenkins server
on a Mac Mini.  I am having trouble with the Jenkins setup because I made a
simple project that is to sync to a github repo and then run a script.
Unfortunately I can't get this simple project to run correctly.  I keep
getting a timeout error.  Here is a Console output.

 15:16:57 Building in workspace
/Users/Shared/Jenkins/Home/workspace/MacWitchesServers
15:16:57  > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
15:16:57 Fetching changes from the remote Git repository
15:16:57  > /usr/bin/git config remote.origin.url
<a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample # timeout=10
15:16:57 Fetching upstream changes from <a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample
15:16:57  > /usr/bin/git --version # timeout=10
15:16:57 using GIT_ASKPASS to set credentials
15:16:57  > /usr/bin/git fetch --tags --progress
<a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample +refs/heads/*:refs/remotes/origin/*
15:26:57 ERROR: Timeout after 10 minutes
15:26:57 ERROR: Error fetching remote repo 'origin'
15:26:57 hudson.plugins.git.GitException: Failed to fetch from
<a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample
15:26:57        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
15:26:57        at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1051)
15:26:57        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1082)
15:26:57        at hudson.scm.SCM.checkout(SCM.java:495)
15:26:57        at
hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
15:26:57        at
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
15:26:57        at
jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
15:26:57        at
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
15:26:57        at hudson.model.Run.execute(Run.java:1741)
15:26:57        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
15:26:57        at
hudson.model.ResourceController.execute(ResourceController.java:98)
15:26:57        at hudson.model.Executor.run(Executor.java:410)
15:26:57 Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git
fetch --tags --progress <a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample
+refs/heads/*:refs/remotes/origin/*" returned status code 143:
15:26:57 stdout:
15:26:57 stderr:
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1752)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1495)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
15:26:57        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:795)
15:26:57        ... 11 more
15:26:57 ERROR: null

I su jenkins and did a manual git fetch and there was no issue.  Do anyone
know where I am going wrong.  I did a normal installation of jenkins and
selected plugin related to github.

I am running Jenkins ver. 2.7.4

Thank you for any help, and I stuck at this point.



--
View this message in context: <a href="http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjenkins-ci.361315.n4.nabble.com%2FMac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHLeO3gHxgf_F_sX5m4P9GZwPKaaQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjenkins-ci.361315.n4.nabble.com%2FMac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHLeO3gHxgf_F_sX5m4P9GZwPKaaQ&#39;;return true;">http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html
Sent from the Jenkins users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/da4afbdb-9eba-4e91-8f8d-45f51de8fa0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Techos
In reply to this post by Jenkins users mailing list
Hello, 

Thanks for your help, I have the same problem and it's ok now. 

but, I have a new problem Cannot run program "mvn" (in directory "/Users/xxx/.jenkins/jobs/myproject/workspace

Do someone has any idea? 

Thanks.

Le mercredi 24 mai 2017 05:00:20 UTC+2, Shuguo Yang a écrit :
Hey, this is because Jenkins is running as the user jenkins, which is not the current user on your mac.

The default path is "/User/Share/Jenkins", install it under "$HOME/.jenkins" to make it work.
So:


1. Stop the current Jenkin on your mac.
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist

The, double check you can't access "localhost:8080" 

2.  Double click the "jenkins.war" file under "Application/jenkins". You will found jenkins
was reinstalled to "$HOME/.jenkins" again. 

3. Then re-config the job, git should works well

I also encounter this issue, and above steps works well for me.

On Monday, September 19, 2016 at 3:35:05 PM UTC+8, Ankit Arora wrote:
Hi,

I am also getting Error while Connecting Jenkins from Github.

Error : Failed to connect to repository : Error performing command: git.exe ls-remote -h

Please suggest the solution

//BR

Ankit Arora
Test Engineer  

✉ : [hidden email] || [hidden email]
☎ :
 
+91-9654293205 ,+91-8285678798

P please consider the environment before printing any email    

Please say "No" to Plastics



 


On Sat, Sep 17, 2016 at 4:06 AM, Hung <[hidden email]> wrote:
HI,  I am new to setting up Jenkins.  I am trying to setup a Jenkins server
on a Mac Mini.  I am having trouble with the Jenkins setup because I made a
simple project that is to sync to a github repo and then run a script.
Unfortunately I can't get this simple project to run correctly.  I keep
getting a timeout error.  Here is a Console output.

 15:16:57 Building in workspace
/Users/Shared/Jenkins/Home/workspace/MacWitchesServers
15:16:57  > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
15:16:57 Fetching changes from the remote Git repository
15:16:57  > /usr/bin/git config remote.origin.url
<a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample # timeout=10
15:16:57 Fetching upstream changes from <a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample
15:16:57  > /usr/bin/git --version # timeout=10
15:16:57 using GIT_ASKPASS to set credentials
15:16:57  > /usr/bin/git fetch --tags --progress
<a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample +refs/heads/*:refs/remotes/origin/*
15:26:57 ERROR: Timeout after 10 minutes
15:26:57 ERROR: Error fetching remote repo 'origin'
15:26:57 hudson.plugins.git.GitException: Failed to fetch from
<a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample
15:26:57        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
15:26:57        at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1051)
15:26:57        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1082)
15:26:57        at hudson.scm.SCM.checkout(SCM.java:495)
15:26:57        at
hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
15:26:57        at
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
15:26:57        at
jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
15:26:57        at
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
15:26:57        at hudson.model.Run.execute(Run.java:1741)
15:26:57        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
15:26:57        at
hudson.model.ResourceController.execute(ResourceController.java:98)
15:26:57        at hudson.model.Executor.run(Executor.java:410)
15:26:57 Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git
fetch --tags --progress <a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample
+refs/heads/*:refs/remotes/origin/*" returned status code 143:
15:26:57 stdout:
15:26:57 stderr:
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1752)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1495)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
15:26:57        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:795)
15:26:57        ... 11 more
15:26:57 ERROR: null

I su jenkins and did a manual git fetch and there was no issue.  Do anyone
know where I am going wrong.  I did a normal installation of jenkins and
selected plugin related to github.

I am running Jenkins ver. 2.7.4

Thank you for any help, and I stuck at this point.



--
View this message in context: <a href="http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjenkins-ci.361315.n4.nabble.com%2FMac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHLeO3gHxgf_F_sX5m4P9GZwPKaaQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjenkins-ci.361315.n4.nabble.com%2FMac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHLeO3gHxgf_F_sX5m4P9GZwPKaaQ&#39;;return true;">http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html
Sent from the Jenkins users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5c192c5c-c313-4dff-9368-6967a35be680%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Mark Waite-2
From the "Global Tool Configuration" page of "Manage Jenkins", configure a Maven installer that downloads the maven version you need from the apache distribution locations.  Jenkins will then install that tool for you automatically when you define the job to require that version of maven.

Mark Waite

On Mon, Jun 5, 2017 at 11:48 AM Techos <[hidden email]> wrote:
Hello, 

Thanks for your help, I have the same problem and it's ok now. 

but, I have a new problem Cannot run program "mvn" (in directory "/Users/xxx/.jenkins/jobs/myproject/workspace

Do someone has any idea? 

Thanks.


Le mercredi 24 mai 2017 05:00:20 UTC+2, Shuguo Yang a écrit :
Hey, this is because Jenkins is running as the user jenkins, which is not the current user on your mac.

The default path is "/User/Share/Jenkins", install it under "$HOME/.jenkins" to make it work.
So:


1. Stop the current Jenkin on your mac.
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist

The, double check you can't access "localhost:8080" 

2.  Double click the "jenkins.war" file under "Application/jenkins". You will found jenkins
was reinstalled to "$HOME/.jenkins" again. 

3. Then re-config the job, git should works well

I also encounter this issue, and above steps works well for me.

On Monday, September 19, 2016 at 3:35:05 PM UTC+8, Ankit Arora wrote:
Hi,

I am also getting Error while Connecting Jenkins from Github.

Error : Failed to connect to repository : Error performing command: git.exe ls-remote -h

Please suggest the solution

//BR

Ankit Arora
Test Engineer  

✉ : [hidden email] || [hidden email]
☎ :
 
<a href="tel:+91%2096542%2093205" value="+919654293205" target="_blank">+91-9654293205 ,+91-<a href="tel:(828)%20567-8798" value="+18285678798" target="_blank">8285678798

P please consider the environment before printing any email    

Please say "No" to Plastics



 


On Sat, Sep 17, 2016 at 4:06 AM, Hung <[hidden email]> wrote:
HI,  I am new to setting up Jenkins.  I am trying to setup a Jenkins server
on a Mac Mini.  I am having trouble with the Jenkins setup because I made a
simple project that is to sync to a github repo and then run a script.
Unfortunately I can't get this simple project to run correctly.  I keep
getting a timeout error.  Here is a Console output.

 15:16:57 Building in workspace
/Users/Shared/Jenkins/Home/workspace/MacWitchesServers
15:16:57  > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
15:16:57 Fetching changes from the remote Git repository
15:16:57  > /usr/bin/git config remote.origin.url
https://github.com/MyAccount/sample # timeout=10
15:16:57 Fetching upstream changes from https://github.com/MyAccount/sample
15:16:57  > /usr/bin/git --version # timeout=10
15:16:57 using GIT_ASKPASS to set credentials
15:16:57  > /usr/bin/git fetch --tags --progress
https://github.com/MyAccount/sample +refs/heads/*:refs/remotes/origin/*
15:26:57 ERROR: Timeout after 10 minutes
15:26:57 ERROR: Error fetching remote repo 'origin'
15:26:57 hudson.plugins.git.GitException: Failed to fetch from
https://github.com/MyAccount/sample
15:26:57        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
15:26:57        at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1051)
15:26:57        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1082)
15:26:57        at hudson.scm.SCM.checkout(SCM.java:495)
15:26:57        at
hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
15:26:57        at
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
15:26:57        at
jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
15:26:57        at
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
15:26:57        at hudson.model.Run.execute(Run.java:1741)
15:26:57        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
15:26:57        at
hudson.model.ResourceController.execute(ResourceController.java:98)
15:26:57        at hudson.model.Executor.run(Executor.java:410)
15:26:57 Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git
fetch --tags --progress https://github.com/MyAccount/sample
+refs/heads/*:refs/remotes/origin/*" returned status code 143:
15:26:57 stdout:
15:26:57 stderr:
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1752)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1495)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
15:26:57        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:795)
15:26:57        ... 11 more
15:26:57 ERROR: null

I su jenkins and did a manual git fetch and there was no issue.  Do anyone
know where I am going wrong.  I did a normal installation of jenkins and
selected plugin related to github.

I am running Jenkins ver. 2.7.4

Thank you for any help, and I stuck at this point.



--
View this message in context: http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html
Sent from the Jenkins users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5c192c5c-c313-4dff-9368-6967a35be680%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtG90qpesxeosLWnEy2QtOPdSnuShE0B9T%2B%2Biw6n16u9hQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Ashwin Ganesh
Hi,

I am facing this issue:
Git fetch timeout - while checking out from a private repo - 
PFB the log:

Building in workspace /Users/Shared/Jenkins/Home/workspace/iOS job

 > git rev-parse --is-inside-work-tree # timeout=10

Fetching changes from the remote Git repository

 > git config remote.origin.url https://github.com/myRepo # timeout=10

Fetching upstream changes from https://github.com/myRepo

 > git --version # timeout=10

using GIT_ASKPASS to set credentials 

 > git fetch --tags --progress https://github.com/myRepo +refs/heads/*:refs/remotes/origin/*

ERROR: Timeout after 10 minutes

ERROR: Error fetching remote repo 'origin'

hudson.plugins.git.GitException: Failed to fetch from https://github.com/myRepo

at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:817)

at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1084)

at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1115)

at hudson.scm.SCM.checkout(SCM.java:495)

at hudson.model.AbstractProject.checkout(AbstractProject.java:1212)

at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:566)

at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)

at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:491)

at hudson.model.Run.execute(Run.java:1739)

at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)

at hudson.model.ResourceController.execute(ResourceController.java:97)

at hudson.model.Executor.run(Executor.java:419)

Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://github.com/myRepo +refs/heads/*:refs/remotes/origin/*" returned status code 143:




On Monday, 5 June 2017 14:52:53 UTC-4, Mark Waite wrote:
From the "Global Tool Configuration" page of "Manage Jenkins", configure a Maven installer that downloads the maven version you need from the apache distribution locations.  Jenkins will then install that tool for you automatically when you define the job to require that version of maven.

Mark Waite

On Mon, Jun 5, 2017 at 11:48 AM Techos <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="uEG6aG_8BQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">dev.tech...@...> wrote:
Hello, 

Thanks for your help, I have the same problem and it's ok now. 

but, I have a new problem Cannot run program "mvn" (in directory "/Users/xxx/.jenkins/jobs/myproject/workspace

Do someone has any idea? 

Thanks.


Le mercredi 24 mai 2017 05:00:20 UTC+2, Shuguo Yang a écrit :
Hey, this is because Jenkins is running as the user jenkins, which is not the current user on your mac.

The default path is "/User/Share/Jenkins", install it under "$HOME/.jenkins" to make it work.
So:


1. Stop the current Jenkin on your mac.
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist

The, double check you can't access "localhost:8080" 

2.  Double click the "jenkins.war" file under "Application/jenkins". You will found jenkins
was reinstalled to "$HOME/.jenkins" again. 

3. Then re-config the job, git should works well

I also encounter this issue, and above steps works well for me.

On Monday, September 19, 2016 at 3:35:05 PM UTC+8, Ankit Arora wrote:
Hi,

I am also getting Error while Connecting Jenkins from Github.

Error : Failed to connect to repository : Error performing command: git.exe ls-remote -h

Please suggest the solution

//BR

Ankit Arora
Test Engineer  

✉ : [hidden email] || [hidden email]
☎ :
 
+91-9654293205 ,+91-8285678798

P please consider the environment before printing any email    

Please say "No" to Plastics



 


On Sat, Sep 17, 2016 at 4:06 AM, Hung <[hidden email]> wrote:
HI,  I am new to setting up Jenkins.  I am trying to setup a Jenkins server
on a Mac Mini.  I am having trouble with the Jenkins setup because I made a
simple project that is to sync to a github repo and then run a script.
Unfortunately I can't get this simple project to run correctly.  I keep
getting a timeout error.  Here is a Console output.

 15:16:57 Building in workspace
/Users/Shared/Jenkins/Home/workspace/MacWitchesServers
15:16:57  > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
15:16:57 Fetching changes from the remote Git repository
15:16:57  > /usr/bin/git config remote.origin.url
<a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample # timeout=10
15:16:57 Fetching upstream changes from <a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample
15:16:57  > /usr/bin/git --version # timeout=10
15:16:57 using GIT_ASKPASS to set credentials
15:16:57  > /usr/bin/git fetch --tags --progress
<a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample +refs/heads/*:refs/remotes/origin/*
15:26:57 ERROR: Timeout after 10 minutes
15:26:57 ERROR: Error fetching remote repo 'origin'
15:26:57 hudson.plugins.git.GitException: Failed to fetch from
<a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample
15:26:57        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
15:26:57        at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1051)
15:26:57        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1082)
15:26:57        at hudson.scm.SCM.checkout(SCM.java:495)
15:26:57        at
hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
15:26:57        at
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
15:26:57        at
jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
15:26:57        at
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
15:26:57        at hudson.model.Run.execute(Run.java:1741)
15:26:57        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
15:26:57        at
hudson.model.ResourceController.execute(ResourceController.java:98)
15:26:57        at hudson.model.Executor.run(Executor.java:410)
15:26:57 Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git
fetch --tags --progress <a href="https://github.com/MyAccount/sample" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMyAccount%2Fsample\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHF4mVaa3CRoOoy3eeWl-I21Vx2mA&#39;;return true;">https://github.com/MyAccount/sample
+refs/heads/*:refs/remotes/origin/*" returned status code 143:
15:26:57 stdout:
15:26:57 stderr:
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1752)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1495)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
15:26:57        at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
15:26:57        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:795)
15:26:57        ... 11 more
15:26:57 ERROR: null

I su jenkins and did a manual git fetch and there was no issue.  Do anyone
know where I am going wrong.  I did a normal installation of jenkins and
selected plugin related to github.

I am running Jenkins ver. 2.7.4

Thank you for any help, and I stuck at this point.



--
View this message in context: <a href="http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjenkins-ci.361315.n4.nabble.com%2FMac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHLeO3gHxgf_F_sX5m4P9GZwPKaaQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjenkins-ci.361315.n4.nabble.com%2FMac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHLeO3gHxgf_F_sX5m4P9GZwPKaaQ&#39;;return true;">http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626.html
Sent from the Jenkins users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/1474065395598-4842626.post%40n4.nabble.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="uEG6aG_8BQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/5c192c5c-c313-4dff-9368-6967a35be680%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/5c192c5c-c313-4dff-9368-6967a35be680%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/5c192c5c-c313-4dff-9368-6967a35be680%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/5c192c5c-c313-4dff-9368-6967a35be680%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/613d19e5-3d45-430f-a967-6b9362453c64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Eric-4
In reply to this post by Mark Waite-2
I have this configured this way as well, but it still hangs on:

git fetch --tags --progress git@git.world1:space.git +refs/heads/*:refs/remotes/origin/*

SSH'ing into Jenkins and running git clone with the same key in ~/.ssh works just fine

git clone git@git.world1:space.git


On Saturday, September 17, 2016 at 12:27:34 AM UTC-4, Mark Waite wrote:
You need a credential that looks like this ->

github-username-password.png

You don't want a credential that looks like this ->
github-rsa-private-key.png

Mark Waite

On Fri, Sep 16, 2016 at 8:33 PM Hung <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="NIS0LC42BAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">hung....@...> wrote:
Thanks, I will try to see if I can this to work a little more before trying
to install older version of git.  I didn't any setting for me to choose
https or ssh.  I just added the credentials in the SCM location when i added
my repo.  I chose username and password and provided both.  Here is image of
the credential in the Jenkins Credential Tab.

<<a href="http://jenkins-ci.361315.n4.nabble.com/file/n4842697/Screen_Shot_2016-09-16_at_8.png" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjenkins-ci.361315.n4.nabble.com%2Ffile%2Fn4842697%2FScreen_Shot_2016-09-16_at_8.png\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFLe2CD_4EXVYZBsqXlgXap-jtNkw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjenkins-ci.361315.n4.nabble.com%2Ffile%2Fn4842697%2FScreen_Shot_2016-09-16_at_8.png\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFLe2CD_4EXVYZBsqXlgXap-jtNkw&#39;;return true;">http://jenkins-ci.361315.n4.nabble.com/file/n4842697/Screen_Shot_2016-09-16_at_8.png>

If there is a location in the Jenkins to say use https or ssh, please let me
know.



--
View this message in context: <a href="http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626p4842697.html" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjenkins-ci.361315.n4.nabble.com%2FMac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626p4842697.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGsw6goJ1AaEyQa9pNGLtvSxIrH6A&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjenkins-ci.361315.n4.nabble.com%2FMac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626p4842697.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGsw6goJ1AaEyQa9pNGLtvSxIrH6A&#39;;return true;">http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626p4842697.html
Sent from the Jenkins users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="NIS0LC42BAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/1474082919062-4842697.post%40n4.nabble.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1474082919062-4842697.post%40n4.nabble.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1474082919062-4842697.post%40n4.nabble.com&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/1474082919062-4842697.post%40n4.nabble.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5b502a96-a45a-44c4-920e-b7ef21f12a66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Mac Jenkins Can't Clone/fetch from GitHub

Mark Waite-2


On Thu, Jan 11, 2018 at 7:15 PM Eric <[hidden email]> wrote:
I have this configured this way as well, but it still hangs on:

git fetch --tags --progress git@git.world1:space.git +refs/heads/*:refs/remotes/origin/*

SSH'ing into Jenkins and running git clone with the same key in ~/.ssh works just fine

git clone git@git.world1:space.git


I'm not sure what you mean by "I have this configured this way as well", so I'll make a guess.

If that means you have configured a username and password credential (as shown in the image), and then are trying to clone with the command you listed, it can't work.

The "git@hostname:path" syntax is a git shorthand for ssh based authentication.  It requires a private key credential rather than a username / password pair.

The private key you're currently using is probably stored in ~/.ssh/id_rsa.  That's the private key to use as the credential for that repository.

If my guess of your meaning is incorrect, please provide more details of what you mean when you say "I have this configured this way as well".

Mark Waite
 

On Saturday, September 17, 2016 at 12:27:34 AM UTC-4, Mark Waite wrote:
You need a credential that looks like this ->

github-username-password.png

You don't want a credential that looks like this ->
github-rsa-private-key.png

Mark Waite

On Fri, Sep 16, 2016 at 8:33 PM Hung <[hidden email]> wrote:
Thanks, I will try to see if I can this to work a little more before trying
to install older version of git.  I didn't any setting for me to choose
https or ssh.  I just added the credentials in the SCM location when i added
my repo.  I chose username and password and provided both.  Here is image of
the credential in the Jenkins Credential Tab.

<http://jenkins-ci.361315.n4.nabble.com/file/n4842697/Screen_Shot_2016-09-16_at_8.png>

If there is a location in the Jenkins to say use https or ssh, please let me
know.



--
View this message in context: http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626p4842697.html
Sent from the Jenkins users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1474082919062-4842697.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5b502a96-a45a-44c4-920e-b7ef21f12a66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtFG852VhBZbp%3DZ6HCP6uFw270-Zg_7z8zdhHZPyc4BA1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
12