fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.

2,299 views
Skip to first unread message

Sean Dooley

unread,
Jul 7, 2017, 4:22:57 AM7/7/17
to go-cd
We have the following setup at work which we have had working in the past.

Go Server - installed on a Mac mini
Go Agent - installed on a Mac mini
Go Agent - installed on a Windows machine

Recently we had to re-install our setup, and everything is working okay on the Go Server and the Mac mini Go Agent. Yet on the Windows Go Agent, I am getting the following error for all git repositories.

09:06:08.071 [go] Job Started: 2017-07-07 09:06:08 BST

09:06:08.071 [go] Start to prepare XXX/61/build/4/build on WinBuildMachine [C:\Go Agent]
09:06:08.086 [go] Start to update materials.

09:06:08.087 [go] Start updating files at revision XXXXXX from https://github.com/XXX/XXX.git
09:06:08.128 Error performing command: --- Command ---
git rev
-parse --abbrev-ref HEAD
--- Environment ---
{}
--- INPUT ----


--OUTPUT ---
HEAD
--- ERROR ---
STDERR
: fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
STDERR
: Use '--' to separate paths from revisions, like this:
STDERR
: 'git <command> [<revision>...] -- [<file>...]'
---

09:06:08.158 [go] Job completed XXX/61/build/4/build on WinBuildMachine [C:\Go Agent]

I have the Go Agent installed in C:\Go Agent.
I've had the Go Agent log on as a local service and an administrator user account.
Using Git Bash manually, I'm able to clone a private remote repository into C:\Go Agent\pipelines.

Installed software

Go Server 16.7.0
Go Agent 16.7.0
Git for Windows version 2.13.2

I'm unsure what else to try at this point so any help would be greatly appreciated.

Sean Dooley

unread,
Jul 7, 2017, 6:59:41 AM7/7/17
to go-cd
After setting the Go Agent to run using a system account, and granting that system account full permissions to the Go Agent directory the pipeline has started working again.

Prior to this, I did manually clone one of the Git repositories into the pipeline directory, C:\Go Agent\pipelines, before re-running the pipeline. Whether that has made a difference, I'm not sure.
Reply all
Reply to author
Forward
0 new messages