Configure Vagrant to ignore SSL certificate behind corporate proxy.
The first case
The first case is to download Vagrant box.
$ vagrant box add --provider virtualbox debian/buster64
The box 'debian/buster64' could not be found or could not be accessed in the remote catalog. If this is a private box on HashiCorp's Vagrant Cloud, please verify you're logged in via 'vagrant login'. Also, please double-check the name. The expanded URL and error message are shown below: URL: ["https://vagrantcloud.com/debian/buster64"] Error: SSL certificate problem: self signed certificate in certificate chain
The solution is to add --insecure
parameter.
$ vagrant box add --provider virtualbox --insecure debian/buster64
==> box: Loading metadata for box 'debian/buster64' box: URL: https://vagrantcloud.com/debian/buster64 ==> box: Adding box 'debian/buster64' (v10.4.0) for provider: virtualbox box: Downloading: https://vagrantcloud.com/debian/boxes/buster64/versions/10.4.0/providers/virtualbox.box box: Download redirected to host: vagrantcloud-files-production.s3.amazonaws.com ==> box: Successfully added box 'debian/buster64' (v10.4.0) for 'virtualbox'!
The second case
The second case is to download Vagrant plugin.
$ vagrant plugin install vagrant-proxyconf
Installing the 'vagrant-proxyconf' plugin. This can take a few minutes... ERROR: SSL verification error at depth 1: self signed certificate in certificate chain (19) ERROR: Root certificate is not trusted (/O=sleeplessbeastie.eu/CN=*.sleeplessbeastie.eu) Vagrant failed to load a configured plugin source. This can be caused by a variety of issues including: transient connectivity issues, proxy filtering rejecting access to a configured plugin source, or a configured plugin source not responding correctly. Please review the error message below to help resolve the issue: SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://api.rubygems.org/specs.4.8.gz) Source: https://rubygems.org/
Bypass these SSL certificate checks.
$ echo :ssl_verify_mode: 0 | tee ~/.gemrc
:ssl_verify_mode: 0
Bypass these SSL certificate checks.
$ vagrant plugin install vagrant-proxyconf
Installing the 'vagrant-proxyconf' plugin. This can take a few minutes... ERROR: SSL verification error at depth 1: self signed certificate in certificate chain (19) ERROR: Root certificate is not trusted (/O=sleeplessbeastie.eu/CN=*.sleeplessbeastie.eu) ERROR: SSL verification error at depth 1: self signed certificate in certificate chain (19) ERROR: Root certificate is not trusted (/O=sleeplessbeastie.eu/CN=*.sleeplessbeastie.eu) Fetching vagrant-libvirt-0.1.2.gem Fetching vagrant-proxyconf-2.0.10.gem Successfully installed 'vagrant=proxyconf (2.0.10)'!