12

I'm trying to configure my Jenkins job to connect to Altassian Stash. I'm using the git plugin for Jenkins.

Here the job configuration details- under source code management, choose git:

Repository Url: https://lab.xyz.com/stash/scm/projects/sandbox.git

Credentials: jenkinuser/password (defined in the global credentials of Jenkins configuration)

I get the following error:

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

(The tmp name keeps changing).

Appreciate any help. Thanks.

SQB
  • 3,926
  • 2
  • 28
  • 49
parram
  • 309
  • 1
  • 2
  • 6
  • It might be a permissions issue on your local machine writing to the TEMP directory. – Rog Nov 16 '14 at 23:27
  • We had to downgrade to git plugin version 1.5.0 and git client plugin version 1.0.7 and it worked. – parram Nov 18 '14 at 23:05
  • Was getting similar error on Red Hat. Fixed it by installing `git` on Jenkins Server: `yum install -y git` – CᴴᴀZ Jul 15 '16 at 09:10

3 Answers3

12

I know its a little late but this worked for me:

Check if you have install git on the Jenkins server, and check if you have set the git executable path in the Jenkins configuration

More specifically go to 'Manage Jenkins' -> 'Global Tool Configuration' and check the 'Path to Git executable' field.

Source: https://serverfault.com/a/669487/212634

Community
  • 1
  • 1
Ash
  • 8,583
  • 10
  • 39
  • 52
2

In Global Tool Configuration, where you "set" GIT location: C:/Program Files (x86)/Git/bin/git.exe. Do not forget to include ‘.exe’ extension. It is for Windows.

1

We had to downgrade to git plugin version 1.5.0 and git client plugin version 1.0.7 and it worked. We are running Jenkins version 1.577.

That git plugin takes the url as: https://jenkinuser:password@lab.xyz.com/stash/scm/projects/sandbox.git

parram
  • 309
  • 1
  • 2
  • 6