Go unable to fetch repository from Git on remote agent

543 views
Skip to first unread message

Aaron Beety

unread,
Apr 17, 2015, 2:44:32 AM4/17/15
to go...@googlegroups.com
I have added a pipeline and to that pipeline added as a Git material, and checked the connection which was ok.
When building I get this error:

java.lang.RuntimeException: 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>...]'
---
 I've tried Go with other Git repositories, they all worked, this is the only one that is showing this error
 Sometimes instead of giving that error, the build freezes at this phase:
STDERR: Cloning into 'C:\Program Files (x86)\Go Agent\pipelines\...

All these errors do not show up when I run the build on the agent on the local machine, they appear when i run them on a remote agent

Ketan Padegaonkar

unread,
Apr 17, 2015, 2:50:02 AM4/17/15
to Aaron Beety, go...@googlegroups.com
Hi Aaron,

This generally implies that your git repository is empty, can you confirm if that is the case?

I'd also urge that you file an issue (https://github.com/gocd/gocd/issues) about this for the team to look into.

Thanks.



--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Richardson

unread,
Apr 17, 2015, 4:12:10 PM4/17/15
to go...@googlegroups.com
I would think that the first one is due to a corrupt local git repo in your pipeline folder. I would try either deleting the folder, or enabling the 'clean working directory' option.

As for the second one, I would guess that its due to a known_hosts issue, where it doesn't trust the git server, and is sitting there prompting the user to accept (or not) the host key.

(I've faced both of these issues this week (due to a git migration) and these solutions worked well)

Hope that helps.

cheers,
Matt
Reply all
Reply to author
Forward
0 new messages