On Wednesday, February 13, 2013 10:36:52 AM UTC+1, Gabby Romano wrote:
>
> hi all,
>
> I hope it's the right place for this kind of issues, but since I didn't 
> find a solution elsewhere, I thought to give it a try.
> I am trying to switch to an ssh URL instead of HTTP based one in the git 
> plugin under Jenkins. whenever I am doing this and trying to run a git hook 
> which does polling, I am getting this error:
>
> Fetching changes from the remote Git repositories
> Fetching upstream changes from ssh://git@<repo URL>
> ERROR: Problem fetching from origin / origin - could be unavailable. 
> Continuing anywayhudson.plugins.git.GitException 
> <http://stacktrace.jenkins-ci.org/search?query=hudson.plugins.git.GitException>:
>  Command "/usr/bin/git fetch -t ssh://git@<repo URL> 
> +refs/heads/*:refs/remotes/origin/*" returned status code 128:
> stdout: 
> stderr: Host key verification failed.
> fatal: The remote end hung up unexpectedly
>
>       at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:897)
>       at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:858)
>       at hudson.plugins.git.GitAPI.fetch(GitAPI.java:200)
>       at hudson.plugins.git.GitAPI.fetch(GitAPI.java:1105)
>       at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:813)
>       at hudson.plugins.git.GitSCM.access$100(GitSCM.java:72)
>       at hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:744)
>       at hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:731)
>       at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2236)
>       at hudson.remoting.UserRequest.perform(UserRequest.java:118)
>       at hudson.remoting.UserRequest.perform(UserRequest.java:48)
>       at hudson.remoting.Request$2.run(Request.java:326)
>       at 
> hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
>       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>       at java.lang.Thread.run(Thread.java:722)
> Polling for changes in
> Done. Took 0.25 sec
> Changes found
>
>
> I tried increasing the MaxStartups attribute in sshd_config but it didn't 
> help.git version used is 1.7.9.6.  
>
> any idea what could be the cause of this ?
>
>
>

It's an authentication problem. It will only work if the account running 
Jenkins has SSH key access to the Git host.

So essentially, before this will work, you should be able to do something 
like:

# on jenkins server
sudo su jenkins # become the user which runs the jenkins process
ssh git@<repo url>
# connection successful, no prompt for password

Does that work?

See also 
https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-Gotchas 

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to