Ask Your Question
0

Clone Private Github Repo

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

svantil gravatar image

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

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
3

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

svantil gravatar image

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

Looks like this works good:

vcsrepo { '/opt/vcstest':
  ensure   => latest,
  provider => git,
  source   => 'git://github.com/demo/demo.git',
  revision => 'master',
}
edit flag offensive delete link more
0

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

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://github.com/marcelklehr/nodist.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

Comments

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 -0500 )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

Stats

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

Seen: 1,407 times

Last updated: Jul 21 '13