I want to pull some gitlab repositories using vcsrepo but for some reason it fails to execute.

vcsrepo { "/tmp/repo/update":
 ensure => present,
 provider => git,
 source => "git@gitlab:${git_url}",
 user => 'update',

The ssh key belongs to the user update, the source doesn't work with or without 'git@'

The error:

err: /Stage[main]//Node[xxx]/Git::Add_git[webhooks]/Vcsrepo[/tmp/webhooks/update]/ensure: change from absent to present failed: Could not set 'present on ensure: undefined method `execute' for Puppet::Util::Execution:Module at /tmp/vagrant-puppet-2/modules-0/git/manifests/init.pp:54

What did I do wrong?

  • help please! :(
    – Granolaboy
    Jan 30, 2015 at 9:00
  • Having same issue, just put a bounty on this.
    – skrilled
    Feb 19, 2015 at 23:25
  • Which version of puppet are you using?
    – Tim Stoop
    Feb 20, 2015 at 14:06
  • Also, your error is noting a resource "Vcsrepo[/tmp/webhooks/update]", but you pasted the resource "/tmp/repo/update". Can you show the definition for /tmp/webhooks/update please?
    – Tim Stoop
    Feb 20, 2015 at 14:09
  • I use a defined type, which adds multiple repositories to my system. It should be ${repo} and the name of the repo is automatically the name of the subfolder. I use Puppet 2.7
    – Granolaboy
    Feb 20, 2015 at 15:59

1 Answer 1


If you're using the latest version of vcsrepo (https://forge.puppetlabs.com/puppetlabs/vcsrepo) in Puppet 2.7, that might be the reason why it's not working. According to the forge page, it requires Puppet 3.x.

  • Then it shouldn't work with Git or SVN though, but I have no problems checking such repos out.
    – Granolaboy
    Feb 20, 2015 at 16:53
  • Are these the only resources for which you use the user parameter? Could the others be using the default user (= the user as which puppet runs?). Reason I'm asking is that it looks to me the code only triggers the 'execute' when the user parameter is used. Check github.com/puppetlabs/puppetlabs-vcsrepo/blob/master/lib/puppet/… line 433.
    – Tim Stoop
    Feb 20, 2015 at 17:59
  • This worked for me; added the puppetlabs repository and used the latest version instead of the version that came bundled with epel.
    – skrilled
    Feb 20, 2015 at 23:27
  • I use two different defined types for SVN and Gitlab, I added the 'user' variable to the Gitlab type because I want to check out the repo with a certain SSH user. Without the 'user' variable I get the following error:
    – Granolaboy
    Feb 24, 2015 at 11:06
  • err: /Stage[main]//Node[xxx]/Git::Add_git[webhooks]/Vcsrepo[/tmp/webhooks/update]/ensure: change from absent to present failed: Execution of '/usr/bin/git clone gitlab://xxx/gitlab-webhooks.git /tmp/webhooks/update' returned 128: Cloning into '/tmp/webhooks/update'... fatal: Unable to find remote helper for 'gitlab'
    – Granolaboy
    Feb 24, 2015 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.