How to clone/pull from private repo automatically in Vagrant

git ssh vagrant bitbucket provisioning

530 просмотра

1 ответ

Hi fellow overflowers!

I'm trying to write a provisioning script which automatically clones/pulls from a specific private repository on Bitbucket, everytime a vagrant box is initialized.

Ideally, I would like to use a deployment key. But maybe SSH-agent forwarding is also an option, I'm not entirely sure how/if this yields different results.

I have searched half the internet for this and tried so many things, but I can't find the best practice, let alone any clearly explained, working method.

I hope you can help me out!

Автор: Flip van Wijk Источник Размещён: 08.11.2019 11:20

Ответы (1)

0 плюса

If you plan to distribute the box and the project, bitbucket deployment key is certainly the best option. I use that for VM that are used only for testing purpose so not linked with defined account.

I personally use puppet provision and do something like

  file_line { 
       path => '/home/<user>/.ssh/authorized_keys',
       line => 'ssh-rsa XXXX key',
Автор: Frédéric Henri Размещён: 20.08.2016 01:41
Вопросы из категории :