2

"Failed to find 'git' on your PATH. Please ensure 'git' is executable by the Go Server and on the Go Agents where this material will be used."

I'm getting this when attempting to use GIT when creating a new build pipeline.

I'm not that experienced with Linux to know how to debug this and I can't find anything in the docs or via a google search.

GO was installed as root, so was GIT, the server has been rebooted since and I can run git in bash. "which git" shows that it is in /usr/bin. "export $path" shows that /usr/bin is in the PATH variable.

Can anyone recommend anything else to try?

Thanks.

rob74
  • 4,939
  • 29
  • 31
Martin Blore
  • 2,125
  • 4
  • 22
  • 34
  • How are you attempting to run the Go server/agents? If they are being started as services they may not have the PATH you expect them to have. – Etan Reisner May 09 '14 at 20:03
  • I followed the installation docs and they auto-started after I ran RPM. I've also tried restarting them with "service go-server restart". – Martin Blore May 09 '14 at 21:34
  • I just don't know how to verify what PATH it's using. I did everything on the root account so figured the service was starting under that user? – Martin Blore May 09 '14 at 21:35
  • The service may run as root. It may run as its own user. It may run as the `nobody` (or similar) user. You'll have to check the service's init script to see what it does. – Etan Reisner May 09 '14 at 23:14
  • Is the error message coming back from the pipeline creation screens or from a pipeline stage/job output? If the error is from the pipeline creation screens, then the problem lies on the Go Server, but if the error comes back from a Job run, it's possibly the Go Agent that cannot find git. – Matthew Skelton Sep 24 '14 at 13:44

2 Answers2

2

The Go server and agent runs under user 'go' and therefore you will need to ensure git is in path for this user.

Change the user to go. If you get a prompt for password, put the password of the current logged in user.

$ sudo su - go

Then check if git is in path or simply check for the version

$ which git
$ git --version

If you don't get expected output for the above commands you might have to provide git executables to the user 'go', that is, you will need to add git in this user's PATH. Alternatively, you can provide the path in /etc/default/go-server

export PATH=$PATH:/path/to/git
Community
  • 1
  • 1
Ali
  • 156
  • 4
0

I recall having this problem too, for me it was related to a local git repository that I did not share with the git daemon. Running the repository with the git daemon solved this problem for me. URL for me starts with git://localhost, not sure if http will work too

Jos
  • 11
  • 3