Jenkins + Git exception

163 views
Skip to first unread message

Aviad Sharfshtein

unread,
Jun 5, 2016, 6:37:46 AM6/5/16
to Jenkins Users
Hi,

I'm new to Jenkins, and trying to run it locally from my windows machine.
however I got the following exception:

Started by user anonymous
Building in workspace C:\workPrograms\jenkins\jobs\server1\workspace
 > git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git.exe config remote.origin.url http://mygit.com/backend/server.git # timeout=10
Fetching upstream changes from http://mygit.com/backend/server.git
 > git.exe --version # timeout=10
 > git.exe -c core.askpass=true fetch --tags --progress http://mygit.com/backend/server.git +refs/heads/*:refs/remotes/origin/*
ERROR: Timeout after 10 minutes
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from http://mygit.com/backend/server.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:810)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1066)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1738)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: hudson.plugins.git.GitException: Command "git.exe -c core.askpass=true fetch --tags --progress http://mygit.com/backend/server.git +refs/heads/*:refs/remotes/origin/*" returned status code -1:
stdout: 
stderr: 
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1463)
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:808)
... 11 more
ERROR: null
Finished: FAILURE

what am I missing here?

Aviad

Mark Waite

unread,
Jun 5, 2016, 7:51:24 AM6/5/16
to Jenkins Users
That message (timeout from http or https access to a repository) usually means that you either did not enter credentials, did not select to use credentials for the repository (username / password in the case of http or https), or that you entered incorrect credentials.  The Jenkins credentials system will allow you to enter credentials once (from "Manage Jenkins" the "Credentials"), then reuse them for many jobs.

Thanks,
Mark Waite

--
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 https://groups.google.com/d/msgid/jenkinsci-users/54b683b8-1366-49db-891f-cf5ac1cd6c8e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aviad Sharfshtein

unread,
Jun 9, 2016, 3:53:19 AM6/9/16
to Jenkins Users
this is odd since running the same commands from command line (on the same machine) works like a charm.

is there a way to test the connection?
Reply all
Reply to author
Forward
0 new messages