As I commented, specifying the HOME
environment variable is key, when using ssh protocol.
Since Windows doesn’t have a HOME
, you need to define it explicitly, to whatever directory you want.
However, Vestnik comments:
I’ve specified to override
HOME
on the windows slave node to point it toC:\jenkins
.
I’ve put correctid_rsa
under theC:\jenkins\.ssh
but still have this issue.
My slave agent running as service under SYSTEM account.
- Similar issue: “Problem with Hudson + Git + Gitosis on windows“
- Similar resolution: “Problem with Hudson + Git + Gitosis on windows“
Two advices:
- you need to make your slave display ‘
set
‘ in order to check if HOME is defined when used with the SYSTEM account.
If it is not, that may mean you need to add that variable to the “system environment variables”, not the “user environment variables”.
- Don’t forget to have both
id_rsa
andid_rsa.pub
in the%HOME%\.ssh
directory: you need both public and private ssh keys. (as mentioned in “git clone with ssh issue“)
If you have a parametrized build, you also can define HOME
that way and check if your slave picks up the right value for HOME
: