No commit activity in last 3 years
No release in over 3 years
Private, versioned Vagrant boxes hosted via LFS in GitLab.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
 Project Readme

Build Status Gem Version

vagrant-gitlabauth

Private, versioned Vagrant boxes hosted via LFS in GitLab. Inspired by vagrant-s3auth.

Installation

From the command line:

$ vagrant plugin install vagrant-gitlabauth

Usage

First generate private token in GitLab Profile Setting page of your account (e.g. profile/account, see https://docs.gitlab.com/ce/api/README.html#private-tokens for more details).

vagrant-gitlabauth will then automatically use environment variable PRIVATE_TOKEN as private_token query parameter and essentially authenticate following requests:

gitlab://git.private/group/project/raw/master/box
gitlab://git.private/group/project/raw/master/metadata
gitlabs://git.private/group/project/raw/master/box
gitlabs://git.private/group/project/raw/master/metadata

Hints:

  • Make sure you use --cacert, --cert or similar parameters when working with self-signed SSL certificates (e.g. vagrant box add --insecure gitlabs://git.private/group/project/raw/master/box)

Auto-install

Add following to your Vagrantfile:

['vagrant-gitlabauth'].each do |plugin_name|
  unless Vagrant.has_plugin?(plugin_name)
    # Attempt to install missing plugin
    system("vagrant plugin install #{plugin_name}") || exit!
    # Relaunch Vagrant so the plugin is detected. Exit with the same status code.
    exit system('vagrant', *ARGV)
  end
end

References