Thanks.

Here's the output of ls-remote:

/opt/go-agent/pipelines/Poseidon_new# git ls-remote ssh://git@<removed by 
Hans>.net:7999/aweb/poseidon.git
9115713caeb293e6a046520b9f7417f487e6f5d9        HEAD
9115713caeb293e6a046520b9f7417f487e6f5d9        refs/heads/master


<https://lh3.googleusercontent.com/-klTbA3i3h5s/V-ZKR_MTFHI/AAAAAAAAAQk/WHbusTde3N4C2hGmwLaind5V32yQt5bGwCLcB/s1600/no_branches.png>
Currently, the repo only has a master, no other branches or tags:

Thanks,
Hans

On Saturday, 24 September 2016 19:04:35 UTC+10, Ketan Padegaonkar wrote:
>
> This is likely a cause of having a remote named HEAD. Could you see what 
> you see when you run 'git ls-remote URL'  - feel free to remove any 
> sensitive branch names.
>
> On Sat, Sep 24, 2016, 11:30 AM Hans Dushanthakumar <[email protected] 
> <javascript:>> wrote:
>
>> Hi,
>>
>> Just wondering if anyone can shed some light into an error I'm seeing. 
>> This is on GoCD version 16.7.0, build 3819.
>>
>> The below errors happen when I try to trigger a pipeline (to build a 
>> rails app). The pipeline doesn't start at all.
>>
>> Modification check failed for material: URL: ssh://git@code.<hidden by 
>> Hans>.git, Branch: master [Sep-24 02:41:19]
>> Error performing command: --- Command --- git rev-parse --abbrev-ref HEAD 
>> --- Environment --- {GIT_ALLOW_PROTOCOL=http:https:ssh:git:file:rsync} --- 
>> 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>...]' --- 
>> Could not trigger pipeline 'Poseidon' [Sep-24 02:41:19]
>> Material update failed for material 'ssh://git@code.<hidden by Hans>.git' 
>> because: Error performing command: --- Command --- git rev-parse 
>> --abbrev-ref HEAD --- Environment --- 
>> {GIT_ALLOW_PROTOCOL=http:https:ssh:git:file:rsync} --- 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>...]' --- . Cause: Error performing command: --- Command --- git 
>> rev-parse --abbrev-ref HEAD --- Environment --- 
>> {GIT_ALLOW_PROTOCOL=http:https:ssh:git:file:rsync} --- 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>...]' --- 
>>
>> Any idea what causes this? Is the above 'modification check' done on the 
>> GoCD server or the agent?
>>
>> I've noticed that the pipeline starts fine immediately after I change the 
>> 'Destination Directory' in the Materials setting, just for one time. But 
>> the next time I try to kick it off, it wont start, and the same error is 
>> shown. However if I change the Destination Dir again (say to a blank), then 
>> it starts fine, for one time.
>>
>> The git repo is a bitbucket repo, and the branch is 'master'. It connects 
>> fine, as shown here:
>>
>> <https://lh3.googleusercontent.com/-2R-R1L8QwF4/V-YTpmgphoI/AAAAAAAAAQQ/Pmxk-oScpIwSHw270lpJAd6tQPDagoGLQCLcB/s1600/material_git.png>
>>
>>
>> <https://lh3.googleusercontent.com/-NkTwcghW8qk/V-YUTaicjbI/AAAAAAAAAQU/eptd9OACZCwcWP0fYtE5ipc7PS3vHjmYwCLcB/s1600/clean_working_dir.png>
>> Also, I've enabled 'Clean Working Directory' for each stage, however this 
>> didn't help (I saw this as a recommendation when I searched for this error 
>> in this forum): 
>>
>> Thanks,
>> Hans
>>
>>
>> -- 
>> 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 [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to