Ask Your Question

Clone Private Github Repo

asked 2013-07-21 14:27:58 -0600

svantil gravatar image

updated 2013-07-21 14:29:02 -0600

We have an application in a private Github repo. How do I tell Puppet or create a manifest to clone that private repo to my Redhat Linux servers?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-07-21 22:26:44 -0600

svantil gravatar image

updated 2013-07-21 22:27:22 -0600

Looks like this works good:

vcsrepo { '/opt/vcstest':
  ensure   => latest,
  provider => git,
  source   => 'git://',
  revision => 'master',
edit flag offensive delete link more

answered 2013-07-21 19:22:38 -0600

louis gravatar image

I believe there is a vcs_repo puppet module on the puppet forge site. I didn't want to increase the dependencies on other puppet modules for other reasons.

exec { 'nodist-clone':
    creates   => '/tmp/localrepo',
    path      => '/usr/bin',
    command   => 'git clone -b v0.3.5 git:// /tmp/localrepo',
    logoutput => true

I added an example to the nodist github repo with a specific branch.

Hope this helps

edit flag offensive delete link more


Thanks for the start. This does not update if there is change pushed to the git repo. If you know how to make it do that, please let me know. Thanks again.

svantil gravatar imagesvantil ( 2013-07-21 21:09:07 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-07-21 14:27:58 -0600

Seen: 1,557 times

Last updated: Jul 21 '13