On Monday, March 10, 2014 9:46:21 AM UTC-5, Nick Miller wrote:
>
> Thank you for the replies.  What I've done is setup the agent on the 
> puppet master to pull the latest version of the repo, then the agents 
> recursively pull the directory.  There are a couple of problems I'm running 
> into.  
>
> The first is that line breaks seem to be stripped from any text files the 
> nodes pull down.  On the master the file looks correct, but then on the 
> node all of the line breaks are gone.
>


Most likely the files have UNIX line endings (LF instead of CRLF).  If you 
turn on the git option "core.autocrlf" for the repo on your clients, then 
git should convert convert line termination of text files automatically.

 

>
> I occasionally run into the following error when pulling the latest 
> version of the repo:
>
> Error: /Stage[main]/Gitrepo/Vcsrepo[/tmp/git/puppet-test]: Could not 
> evaluate: Execution of '/bin/git rev-parse origin/(detached from 3c40894)' 
> returned 128: fatal: ambiguous argument 'origin/(detached from 3c40894)': 
> unknown revision or path not in the working tree.
> Use '--' to separate paths from revisions, like this:
> 'git <command> [<revision>...] -- [<file>...]'
> origin/(detached from 3c40894)
>
>

I am not enough of a git illuminatus to immediately know what that means.  
I find the appearance of the literal string '(detached from 3c40894)' 
suspicious, however.  My guess is that you are somehow creating a situation 
that vcsrepo does not handle appropriately.

 

> It seems to happen when I add a file to the repo.  In the manifest I have 
> the following:
>
> class gitrepo {
>          vcsrepo { '/tmp/git/puppet-test':
>
>                 ensure          => latest,
>                 provider        => git,
>                 source          => 
> "[email protected]:user/puppet-test.git",
>                 revision        => 'master',
>         }
>
>
> }
>


Supposing that none of the git experts around here jumps in with special 
insight on your problem, it would be helpful to identify exactly what steps 
are required to elicit the error.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e850a55b-ebe8-4187-8651-1d97361d6caa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to