I am working with 2.7.3, latest vcsrepo from github. Trying to get a
git workarea kept up to date (latest).
The call:
vcsrepo { "puppetm:git:co":
ensure => latest,
provider => git,
path => "$srcdir",
source => "git@github.com:/xxx.git",
owner => "puppet",
group => "puppet",
identity => "$puppetm::puppethomedir/.ssh/
$puppetm::pkeyname",
}
I added some debugging (the warnings) to git.rb to try and figure out
what is going on... but am stumped:
warning: git with identity fetch--tagsorigin
warning: git with identity rev-parseHEAD
warning: git with identity branch-a
warning: git with identity fetchorigin
warning: git with identity fetch--tagsorigin
warning: git with identity rev-parseorigin/HEAD
warning: get_revision ff9625bad45d398573bd664a5fdf7ab2cfa4c185
warning: git with identity fetch--tagsorigin
warning: git with identity branch-a
warning: git with identity fetchorigin
warning: git with identity fetch--tagsorigin
warning: git with identity rev-parseorigin/HEAD
warning: get_revision ff9625bad45d398573bd664a5fdf7ab2cfa4c185
notice: /Stage[main]/Puppetm/Puppetm::Checkout[puppetm:cloudops]/
Vcsrepo[puppetm:git:co]/ensure: Updating to latest
''ff9625bad45d398573bd664a5fdf7ab2cfa4c185'' revision
warning: git with identity branch-a
warning: git with identity tag-l
warning: git with identity branch-a
warning: remote_branch remotes/origin/HEAD -> origin/masterremotes/
origin/devremotes/origin/masterremotes/origin/mvn_projremotes/origin/
tectonic_move
warning: git with identity checkout-
bff9625bad45d398573bd664a5fdf7ab2cfa4c185--trackorigin/
ff9625bad45d398573bd664a5fdf7ab2cfa4c185
err: /Stage[main]/Puppetm/Puppetm::Checkout[puppetm:cloudops]/
Vcsrepo[puppetm:git:co]/ensure: change from present to latest failed:
Execution of ''/usr/bin/git checkout -b
ff9625bad45d398573bd664a5fdf7ab2cfa4c185 --track origin/
ff9625bad45d398573bd664a5fdf7ab2cfa4c185'' returned 128: fatal: git
checkout: updating paths is incompatible with switching branches.
Did you intend to checkout ''origin/
ff9625bad45d398573bd664a5fdf7ab2cfa4c185'' which can not be resolved as
commit?
basically - it looks like it properly figured out the latest commit
SHA - but then goes and does a git checkout -b SHAxxx --track origin/
SHAxxx
but of course there is no remote branch named origin/SHAxxx
standard git setup (I think):
-bash-4.1$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/dev
remotes/origin/master
remotes/origin/mvn_proj
I have tried setting revision => "HEAD" - but that results in no
updates - possibly since it thinks that means the local HEAD rather
than the remote.
ideas?
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
Jacob Helwig
2011-Nov-22 07:02 UTC
Re: [Puppet Users] struggling with vcsrepo, git, latest
On 2011-11-21 22:00 , jwag wrote:> I am working with 2.7.3, latest vcsrepo from github. Trying to get a > git workarea kept up to date (latest). > The call: > > vcsrepo { "puppetm:git:co": > ensure => latest, > provider => git, > path => "$srcdir", > source => "git@github.com:/xxx.git", > owner => "puppet", > group => "puppet", > identity => "$puppetm::puppethomedir/.ssh/ > $puppetm::pkeyname", > } > I added some debugging (the warnings) to git.rb to try and figure out > what is going on... but am stumped: > > > warning: git with identity fetch--tagsorigin > warning: git with identity rev-parseHEAD > warning: git with identity branch-a > warning: git with identity fetchorigin > warning: git with identity fetch--tagsorigin > warning: git with identity rev-parseorigin/HEAD > warning: get_revision ff9625bad45d398573bd664a5fdf7ab2cfa4c185 > warning: git with identity fetch--tagsorigin > warning: git with identity branch-a > warning: git with identity fetchorigin > warning: git with identity fetch--tagsorigin > warning: git with identity rev-parseorigin/HEAD > warning: get_revision ff9625bad45d398573bd664a5fdf7ab2cfa4c185 > notice: /Stage[main]/Puppetm/Puppetm::Checkout[puppetm:cloudops]/ > Vcsrepo[puppetm:git:co]/ensure: Updating to latest > ''ff9625bad45d398573bd664a5fdf7ab2cfa4c185'' revision > warning: git with identity branch-a > warning: git with identity tag-l > warning: git with identity branch-a > warning: remote_branch remotes/origin/HEAD -> origin/masterremotes/ > origin/devremotes/origin/masterremotes/origin/mvn_projremotes/origin/ > tectonic_move > warning: git with identity checkout- > bff9625bad45d398573bd664a5fdf7ab2cfa4c185--trackorigin/ > ff9625bad45d398573bd664a5fdf7ab2cfa4c185 > err: /Stage[main]/Puppetm/Puppetm::Checkout[puppetm:cloudops]/ > Vcsrepo[puppetm:git:co]/ensure: change from present to latest failed: > Execution of ''/usr/bin/git checkout -b > ff9625bad45d398573bd664a5fdf7ab2cfa4c185 --track origin/ > ff9625bad45d398573bd664a5fdf7ab2cfa4c185'' returned 128: fatal: git > checkout: updating paths is incompatible with switching branches. > Did you intend to checkout ''origin/ > ff9625bad45d398573bd664a5fdf7ab2cfa4c185'' which can not be resolved as > commit? > > basically - it looks like it properly figured out the latest commit > SHA - but then goes and does a git checkout -b SHAxxx --track origin/ > SHAxxx > > but of course there is no remote branch named origin/SHAxxx > > standard git setup (I think): > > -bash-4.1$ git branch -a > * master > remotes/origin/HEAD -> origin/master > remotes/origin/dev > remotes/origin/master > remotes/origin/mvn_proj > > > I have tried setting revision => "HEAD" - but that results in no > updates - possibly since it thinks that means the local HEAD rather > than the remote. > > ideas? >Unfortunately, last I checked the vcsrepo type was just broken when it comes to what it does with Git repos. I started trying to clean it up in my spare time[0], but don''t have anything actually ready to merge back into the main repo yet. [0] https://github.com/jhelwig/puppet-vcsrepo/tree/rework-git-provider -- Jacob Helwig http://about.me/jhelwig
A Bhuvaneswaran
2013-Jan-23 17:15 UTC
[Puppet Users] Re: struggling with vcsrepo, git, latest
On Monday, November 21, 2011 10:00:37 PM UTC-8, jwag wrote:> > I am working with 2.7.3, latest vcsrepo from github. Trying to get a > git workarea kept up to date (latest). > The call: > > vcsrepo { "puppetm:git:co": > ensure => latest, > provider => git, > path => "$srcdir", > source => "git@github.com:/xxx.git", > owner => "puppet", > group => "puppet", > identity => "$puppetm::puppethomedir/.ssh/ > $puppetm::pkeyname", > } >It''s missing the "''revision'' => ''master''" key. If you use this key, the code is cloned if it didn''t exist; pulled otherwise. vcsrepo { "puppetm:git:co": ensure => latest, provider => git, path => "$srcdir", source => "git@github.com:/xxx.git", owner => "puppet", group => "puppet", identity => "$puppetm::puppethomedir/.ssh/$puppetm::pkeyname", revision => "master", } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/4T07bNmagW4J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.