Rishi Arora
Rishi Arora

Reputation: 1793

I am not able to build the job in jenkins,,,even I had given the path for github

I am new to jenkins and I was trying to create a job in jenkins. I had pushed my project to github and had supplied the path of github server to jenkins but when I am trying to build the job it is showing an error and not geting build....please help in solving that...

This is the exception that I am getting---

Started by user anonymous
Building in workspace C:\Users\hp\.jenkins\jobs\Spring\workspace
 > git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git.exe config remote.origin.url [email protected]:rishi1020/SpringMVC # timeout=10
Fetching upstream changes from [email protected]:rishi1020/SpringMVC
 > git.exe --version # timeout=10
 > git.exe -c core.askpass=true fetch --tags --progress [email protected]:rishi1020/SpringMVC +refs/heads/*:refs/remotes/origin/*
ERROR: Timeout after 10 minutes
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from [email protected]:rishi1020/SpringMVC
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:735)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:983)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1016)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1282)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
at hudson.model.Run.execute(Run.java:1741)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:381)
Caused by: hudson.plugins.git.GitException: Command "git.exe -c core.askpass=true fetch --tags --progress [email protected]:rishi1020/SpringMVC +refs/heads/*:refs/remotes/origin/*" returned status code -1:
stdout: 
stderr: 
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1591)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1379)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:86)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:324)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:733)
... 11 more
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE

Upvotes: 0

Views: 1001

Answers (3)

Raghav N
Raghav N

Reputation: 201

I suspect , it could be due to git is not configured properly in Jenkins.

Go to Manage Jenkins - > configuration, git configuration should be something like below

enter image description here

Upvotes: 1

mainframer
mainframer

Reputation: 22059

I suspect that is because your jenkins server is not able to comunicate with Github with the SSH key pair you provided.

Before your jenkins can pull code from Github to build, you first must ensure that below git command can work well in your command line.

cd C:\Users\hp\.jenkins\jobs\Spring\workspace
git clone [email protected]:rishi1020/SpringMVC

After above command can work well, then you can go back to jenkins to continue.

Upvotes: 0

blacklabelops
blacklabelops

Reputation: 4948

Does not look like a valid Github repository URL.

Use this as your repository URL: https://github.com/rishi1020/SpringMVC.git

Upvotes: 0

Related Questions