0

I am using Git 2.8.1, Jenkins 1.642.4 and Windows Server 2012 R2 and trying to access a project hosted with Git through https using Git plugin 2.4.4.

After setting my repository URL Jenkins gives me the following error message:

Failed to connect to repository : Could not init C:\Windows\TEMP\hudsonblablabla

I have found several sources stating that this is due to not pointing Jenkins to the correct git location, like in this SO question however setting the absolute path to the git location has not fixed this issue for me.

Some of the paths I have already tried without luck:

C:\Program Files\Git\cmd\git
C:\Program Files\Git\cmd\git.exe
C:\Program Files\Git\bin\git
C:\Program Files\Git\bin\git.exe
C:\Program Files\Git\git-cmd

Am I using the wrong path or is the issue something else?

Community
  • 1
  • 1
RusinaRange
  • 341
  • 1
  • 4
  • 18
  • Could it be related to folder permissions? Maybe the jenkins-user doesn't have write-access to C:\Windows\TEMP\ – Emil Kantis Apr 11 '16 at 10:22
  • @EmilKantis How could I check that? It's being run as a service as is recommended for windows so I don't know what the user is in that case. Also there doesn't seem to be any TEMP folder (only Temp) if that changes anything. – RusinaRange Apr 11 '16 at 10:26
  • You can check folder permissions by right-clicking the folder in explorer, hit properties -> Security. http://imgur.com/a/GIo9q , You can also check which user the service is running as by hitting Start -> Run... -> type services.msc -> Right click jenkins service -> Properties -> Log on – Emil Kantis Apr 11 '16 at 10:29
  • The service is running under Local System and SYSTEM seems to have full rights to Temp so I guess that works out. Could it be tripping over the temp folder been named Temp not TEMP? – RusinaRange Apr 11 '16 at 10:36
  • Windows' filesystem is case-insensitive, so that shouldn't be the case – Emil Kantis Apr 11 '16 at 10:37

1 Answers1

0

This was caused by a incorrect repository url. For some reason it showed this error instead of the usual "not a git repository" error.

RusinaRange
  • 341
  • 1
  • 4
  • 18