Stray does not work on windows

I follow the official roaming https://docs.vagrantup.com/v2/getting-started/index.html

I installed the firewall and virtual box on a 64-bit Windows 10 processor. After running these commands on the command line, I get:

vagrant init hashicorp/precise32 vagrant up 

as shown below: Bringing the default machine to the "virtualbox" provider ... ==> default: Box 'hashicorp / exact32' was not found. Trying to find and install ... default: Box Provider: virtualbox default: Box Version:> = 0 Could not find the "hashicorp / exact32" field or could not access the remote directory. If it is private on HashiCorp Atlas, please confirm that you are logged in via vagrant login . Also double check the name. The extended URLs and error message are shown below:

URL: [" https://atlas.hashicorp.com/hashicorp/precise32 "] Error: SSL certificate problem: local issuer certificate cannot be obtained. More details here: http://curl.haxx.se/docs/sslcerts.html

curl verifies the default SSL certificate using the "bundle" of public keys of a certification authority (CA) (CA certificates). If the default package file is not sufficient, you can specify an alternative file using the --cacert option. If this HTTPS server uses a certificate signed by the CA that is provided in the package, the certificate verification probably failed due to a certificate problem (it may expired or the name may not match the domain name in the URL). If you want to disable certificate validation, use the -k option (or - insecure).

How to fix this error?

+7
curl vagrant virtualbox
source share
3 answers

If you get a problem with SSL, you can try adding this field using the --insecure option

 vagrant box add --insecure hashicorp/precise32 hashicorp/precise32 

- unsafe. If present, SSL certificates will not be verified if the HTTPS URL is

You may need to clear the ~/.vagrant.d/tmp/ folder if you have an incomplete transfer

You can also download the ssl certificate and use it directly to work around the error.

 $ vagrant box add --cacert <certificate> box_name 
+10
source share

You can add this to Vagrantfile.

 config.vm.box_download_insecure=true 
+7
source share

Since it is very difficult to disable SSL for a long time, you can correct the certificate error correctly by adding the certificate to the built-in Ruby and curl trust chain (it hurts, but it is possible to automate, http://guides.rubygems.org/ssl-certificate-update/# manual-solution-to-ssl-issue ) or better yet, using the alternate CA path that was added to the new version of Vagrant? config.vm.box_download_ca_cert seems to be a new setting.

Manual way:

 The steps are as follows: Step 1: Obtain the correct trust certificate Step 2: Locate RubyGems certificate directory in your installation Step 3: Copy correct trust certificate Step 4: Profit Step 1: Obtain the correct trust certificate We need to download the correct trust certificate, YourCompanyRootCA.pem. This can probably be obtained from your IT department or by exporting the certificate from your web browser or certificate store (and possibly converting to .pem using OpenSSL). IMPORTANT: File must have .pem as extension. Browsers like Chrome will try to save it as plain text file. Ensure you change the filename to end with .pem after you have downloaded it. Step 2: Locate Ruby certificate directory in your installation In order for us copy this file, we need to know where to put it. Depending on where you installed Ruby (or Vagrant has embedded it), the directory will be different. Take for example the default installation of Ruby 2.1.5, placed in C:\Ruby21 Or the Vagrant default of C:\HashiCorp\Vagrant\embedded (or /opt on Linux) Search for `cacert.pem` or any `*.pem` in those directories. Step 3: Copy new trust certificate Now, locate ssl_certs directory (Ruby) and copy the .pem file we obtained from previous step inside. It will be listed with other files like AddTrustExternalCARoot.pem. If you are updating the Vagrant cacert.pem, make a backup copy, then append the entire contents of your new .pem file to the end of the cacert.pem. This should eliminate the warnings from Vagrant ruby/curl. 
+3
source share

All Articles