ERROR fetching remote repo 'origin' from codebasehq

101 views
Skip to first unread message

Neil Stoker

unread,
Nov 1, 2016, 11:51:21 AM11/1/16
to Jenkins Users
Hi,

I am going round in circles trying to track down what is causing Jenkins giving the following error:



Started by user neils
Building remotely on Project_BA (project) in workspace c:\BuildAgent\workspace\Project_BA QA Test 1
 
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 
> git config remote.origin.url git@codebasehq.com:company/project/repo.git # timeout=10
Fetching upstream changes from git@codebasehq.com:company/project/repo.git
 
> git --version # timeout=10
using GIT_ASKPASS to set credentials
 
> git fetch --tags --progress git@codebasehq.com:company/project/repo.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from g...@codebasehq.com:company/project/repo.git
 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1051)
 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1082)
 at hudson.scm.SCM.checkout(SCM.java:495)
 at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
 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:1720)
 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
 at hudson.model.ResourceController.execute(ResourceController.java:98)
 at hudson.model.Executor.run(Executor.java:401)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress g...@codebasehq.com:company/project/repo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: Host key verification failed.
fatal: Could not read from remote repository.


When using the Jenkins CI credentials I get the expected
jenkins@sgpjenkins:~/tmp/palintestvero$ git fetch --tags --progress git@codebasehq.com:company/project/repo.git + refs/heads/*:refs/remotes/origin/*
From codebasehq.com:company/project/repo
 * branch            HEAD       -> FETCH_HEAD


I can also successfully pull projects from the codebasehq servers.

I must be missing something really obvious, but can't spot what.


Indra Gunawan (ingunawa)

unread,
Nov 1, 2016, 12:47:41 PM11/1/16
to jenkins...@googlegroups.com
This is the error:

stderr: Host key verification failed.
fatal: Could not read from remote repository.


You need to SSH to the node and become whatever the Jenkins user running the build on the node.
You can try git clone the repo as that user and accept host key or you can add this to the $HOME/.ssh/config ($HOME refers to the home directory of the Jenkins user):


Host codebasehq.com
StrictHostKeyChecking no
Hostname codebasehq.com
User <user-name-optional-to-use-other-user-credential-to-clone>
IdentityFile <optional-specify-path-to-the-ssh-private-key-file-of-the-user-name>


From: <jenkins...@googlegroups.com> on behalf of Neil Stoker <neil.st...@gmail.com>
Reply-To: "jenkins...@googlegroups.com" <jenkins...@googlegroups.com>
Date: Tuesday, November 1, 2016 at 8:51 AM
To: Jenkins Users <jenkins...@googlegroups.com>
Subject: ERROR fetching remote repo 'origin' from codebasehq

Hi,

I am going round in circles trying to track down what is causing Jenkins giving the following error:



Startedby user neils
Building remotely on Project_BA(project)in workspace c:\BuildAgent\workspace\Project_BA QA Test1

--
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/75e3f384-9cf1-411b-ab01-8eaf3d38de9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Neil Stoker

unread,
Nov 2, 2016, 11:17:17 AM11/2/16
to jenkins...@googlegroups.com
Thanks for the help, Indra.

Using the Jenkins credentials I can clone the repo sucessfully.

The problems appear to be to do with starting the service on the Windows box.

I'm currently working through that (as well as the other dozen issues I have on my desk at the moment).

On 1 November 2016 at 16:47, Indra Gunawan (ingunawa) <ingu...@cisco.com> wrote:
This is the error:

stderr: Host key verification failed.
fatal: Could not read from remote repository.


You need to SSH to the node and become whatever the Jenkins user running the build on the node.
You can try git clone the repo as that user and accept host key or you can add this to the $HOME/.ssh/config ($HOME refers to the home directory of the Jenkins user):


Host codebasehq.com
StrictHostKeyChecking no
Hostname codebasehq.com
User <user-name-optional-to-use-other-user-credential-to-clone>
IdentityFile <optional-specify-path-to-the-ssh-private-key-file-of-the-user-name>


To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/zeooN8NWR4I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/D43E13DC.5F3AA%25ingunawa%40cisco.com.
Reply all
Reply to author
Forward
0 new messages