I recently ran into the SSL certificate problem while I was deploying a vagrant box in my lab. One of the easiest ways to deploy a vagrant box is to fetch the box directly form a third party website. This initializes and brings up the box on a local providers such as Oracle virtualbox or VMware workstation. It is a method that works when there is direct connectivity to the internet from the host running vagrant.
This issue can be overcome by using an –insecure option if one is downloading the box directly and then planning to initialize it later. The command to do that is :
$ vagrant box add <vag-box> https://insecureserver.com/vagbox.box –insecure
This does not work in case of running a command : $ vagrant init insecureserver/<vag-box>; vagrant up –provider virtualbox.
It throws an error like shown below
One of the ways to workaround this issue is to run the command, then go to the folder where the vagrantfile is created for this particular box and then edit it to include the below line.
config.vm.box_download_insecure = true
Now go back and run the vagrant init command, and the issue goes away. Of course, you will see an error that says a vagrantfile already exists for the particular box.
To get around this you can just use a vagrant up command as the file is already created in the previous step. This is how I got around the SSL certificate issue. Would love to hear if there is a better way to deal with this issue
1,284 total views, 8 views today