Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Hudson » Using Git with Hudson(My Git configuration isn't working on Hudson.)
Using Git with Hudson [message #1083350] Fri, 09 August 2013 21:03 Go to next message
Kevin Simonson is currently offline Kevin Simonson
Messages: 4
Registered: August 2013
Junior Member
I'm trying to get Hudson working on a new machine. From the main dashboard I click on <Manage Hudson> and then <Configure System>. Then I scroll down to the section labeled <Git>. There's a textbox labeled <Path to Git executable>; I enter into that textbox "C:/tools/Git/cmd/git.exe", and then click on <Save> down at the bottom of the page.

At this point I click on the icon on the left of the main dashboard for our Firefox UI build and start that build going on the machine of my choice. It runs for a few seconds, and then dies. The console output is:

Started by user anonymous
Building remotely on Lynx Hudson Slave 2
..........<snip>..........
Fetching changes from the remote Git repository
Fetching upstream changes from git@github.com:fs-eng/links
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
hudson.plugins.git.GitException: Error performing command: C:/tools/Git/cmd/git.exe fetch -t git@github.com:fs-eng/links +refs/heads /*:refs/remotes/origin/*
Cannot run program "C:/tools/Git/cmd/git.exe" (in directory "C:\Users\hudson\workspace\Links-UI-Firefox"): CreateProcess error=2, The system cannot find the file specified
at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:747)
at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:709)
..........<snip>..........

I brought up a command prompt, and verified that "git.exe" actually exists at "C:\tools\Git\cmd\git.exe". Furthermore, I know I can execute it because I can type in "git --version" and get the version number. Does anyone know what I'm doing wrong?


Re: Using Git with Hudson [message #1085981 is a reply to message #1083350] Tue, 13 August 2013 16:22 Go to previous messageGo to next message
Geoff Waymark is currently offline Geoff Waymark
Messages: 23
Registered: July 2012
Junior Member
I have C:\tools\Git\cmd\git.exe set. No forward slashes. Which works on my system.

If git.exe is in a different location on the slave, then you have to set the tool location for the slave in the configuration for the node.

Hope that helps


Geoff Waymark
Eclipse Hudson team
Re: Using Git with Hudson [message #1086854 is a reply to message #1085981] Wed, 14 August 2013 20:49 Go to previous messageGo to next message
Kevin Simonson is currently offline Kevin Simonson
Messages: 4
Registered: August 2013
Junior Member
Geoff Waymark wrote on Tue, 13 August 2013 12:22
I have C:\tools\Git\cmd\git.exe set. No forward slashes. Which works on my system.

If git.exe is in a different location on the slave, then you have to set the tool location for the slave in the configuration for the node.

Hope that helps

Geoff, thanks tremendously for your advice. I discovered to my dismay that although "git.exe" existed where specified on the master, it didn't exist on either of the two slaves. I copied over my "C:\tools" directory to both slaves, and then started my build again, and got a little bit further. The error messages now say:

Started by user anonymous
Building remotely on Lynx Hudson Slave 2
Checkout:Links-UI-Firefox / C:\Users\hudson\workspace\Links-UI-Firefox - hudson.remoting.Channel@75e6bfea:Lynx Hudson Slave 2
Using strategy: Default
Last Built Revision: Revision c6ab53918ae4cb1c3523096ab5c6ba8702586b62 (origin/master)
Checkout:Links-UI-Firefox / C:\Users\hudson\workspace\Links-UI-Firefox - hudson.remoting.LocalChannel@1a6fa30c
Fetching changes from the remote Git repository
Fetching upstream changes from git@github.com:fs-eng/links
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
hudson.plugins.git.GitException: Error performing command: C:\tools\Git\cmd\git.exe fetch -t git@github.com:fs-eng/links +refs/heads/*:refs/remotes/origin/*
Command "C:\tools\Git\cmd\git.exe fetch -t git@github.com:fs-eng/links +refs/heads/*:refs/remotes/origin/*" returned status code 128: ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:747)
at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:709)


This has gotten me a little confused. By "ssh_exchange_identification" doesn't it mean there's a problem with my ".ssh" files? But I copied over the exact same files from my ".ssh" directory on the old machine to the respective spots on the three new machines. Do I need to do anything more than copy them over to get Hudson to recognize them?

Kevin S
Re: Using Git with Hudson [message #1087590 is a reply to message #1086854] Thu, 15 August 2013 22:00 Go to previous messageGo to next message
Kevin Simonson is currently offline Kevin Simonson
Messages: 4
Registered: August 2013
Junior Member
[quote title=Kevin Simonson wrote on Wed, 14 August 2013 16:49]Geoff Waymark wrote on Tue, 13 August 2013 12:22
This has gotten me a little confused. By "ssh_exchange_identification" doesn't it mean there's a problem with my ".ssh" files? But I copied over the exact same files from my ".ssh" directory on the old machine to the respective spots on the three new machines. Do I need to do anything more than copy them over to get Hudson to recognize them?

I've gotten past this obstacle too. Now when I click on the build icon for Firefox and then click on the link for this specific build and then on <Console Output>, I get:

Started by user anonymous
Building remotely on Lynx Hudson Slave 2
Checkout:Links-UI-Firefox / C:\Users\hudson\workspace\Links-UI-Firefox - hudson.remoting.Channel@75e6bfea:Lynx Hudson Slave 2
Using strategy: Default
Last Built Revision: Revision c6ab53918ae4cb1c3523096ab5c6ba8702586b62 (origin/master)
Checkout:Links-UI-Firefox / C:\Users\hudson\workspace\Links-UI-Firefox - hudson.remoting.LocalChannel@1a6fa30c
Fetching changes from the remote Git repository
Fetching upstream changes from git@github.com:fs-eng/links


and that's it. I wait several minutes, and the second time several hours, and still this is all that <Console Output> gives me. It's apparently hanging while it's trying to fetch these "upstream changes." I've tried it three times with the same results. Anyone have any idea why it's hanging?

[Updated on: Thu, 15 August 2013 22:00]

Report message to a moderator

Re: Using Git with Hudson [message #1088020 is a reply to message #1087590] Fri, 16 August 2013 13:06 Go to previous message
Geoff Waymark is currently offline Geoff Waymark
Messages: 23
Registered: July 2012
Junior Member
I think it's still, struggling to find the ssh keys. It's possible the user home isn't set correctly on the slave.

Henrik's blog might help.

The error reporting for git + ssh can leave something to be desired.


Geoff Waymark
Eclipse Hudson team
Previous Topic:Loving the Team Concept but... problem with AD users
Next Topic:SCM Polling threads
Goto Forum:
  


Current Time: Thu Oct 02 10:34:19 GMT 2014

Powered by FUDForum. Page generated in 0.16753 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software