2

I got hudson up and running. Installed git plugin. Created new job, typed in git repository URL, saved and hit 'build now'.

It just freezes. When i cancel build, this is what I get:

Started by user anonymous
Checkout:workspace / C:\Users\taboo_user.TABOO.hudson\jobs\Interreg\workspace - hudson.remoting.LocalChannel@94aa42 Using strategy: Default
Checkout:workspace / C:\Users\taboo_user.TABOO.hudson\jobs\Interreg\workspace - hudson.remoting.LocalChannel@94aa42
GitAPI created
Cloning the remote Git repository
Cloning repository origin
$ "C:\Program Files\Git\bin\git.exe" clone -o origin git@subversion.alise.lv:interreg.git C:\Users\taboo_user.TABOO.hudson\jobs\Interreg\workspace ERROR: Error cloning remote repo 'origin' : Could not clone git@subversion.alise.lv:interreg.git ERROR: Cause: Error performing C:\Program Files\Git\bin\git.exe clone -o origin git@subversion.alise.lv:interreg.git C:\Users\taboo_user.TABOO.hudson\jobs\Interreg\workspace
null
Trying next repository
ERROR: Could not clone repository
FATAL: Could not clone

I'm googling for about 2 hours now with no results.

Windows event viewer is empty.

Tried setting specific user for hudson windows service, that has correct ssh key, known hosts and is able to git clone from command line repo w/o problems.

Tried to parametrize hudson build with %HOME% variable.

Tried to add c:/program files/git/bin folder to PATH env variable.

Tried to explicitly tell hudson that it should use c:/program files/git/bin/git.exe.


There are bunch of info around this error message but nothing helps so far. Got no ideas anymore.

Any help?


echo $USERNAME
echo $HOMEPATH
echo $HOME

returns

[workspace] $ sh -xe C:\Users...
+ echo taboo_user
taboo_user
+ echo '\'
\
+ echo

User name is correct for sure.

Arnis Lapsa
  • 45,880
  • 29
  • 115
  • 195
  • If the Hudson job opens a shell, the you need to echo `$USERNAME` (not `%USERNAME%`), $PATH (not `%PATH%`), ... and so on. – VonC Sep 21 '10 at 10:17
  • @VonC looks like it's problem with $HOME variable. Copied `.ssh` dir to `c:/` and it finally works. I wonder why I couldn't set it previously. Kind a tried. – Arnis Lapsa Sep 21 '10 at 10:35
  • @Anis L. : strange, you may be able to define HOME rather than leaving that default value '/'. – VonC Sep 21 '10 at 10:44

1 Answers1

1

If you can clone with a specific user outside of Hudson, but cannot within an Hudson Job, that should mean the user and environment used by Hudson is not correct or complete.

In particular, that all "Started by user anonymous" message worries me.

In those case, I always try to simplify the problem, making a simple script-based Hudson job with the only task to display its username, path and environment variable to see exactly who will be executing my commands (like git).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I suspect 'started by user anonymous' is not OS related as stated here: http://stackoverflow.com/questions/2370371/problem-cloning-fetching-repository-using-git-plugin-for-hudson-on-windows/2371573#2371573 – Arnis Lapsa Sep 21 '10 at 09:47