Re: help using Curl through Vagrant
Date: Sun, 3 Jan 2016 19:23:51 -0500
I tried this using the old command prompt, and I got the following result:
C:\>"c:\HashiCorp\Vagrant\embedded\bin\curl.exe" -v --cacert "c:\HashiCorp\Vagra
* Trying 188.8.131.52...
* Connected to atlas.hashicorp.com (184.108.40.206) port 443 (#0)
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: c:\HashiCorp\Vagrant\embedded\cacert.pem
* TLSv1.2 (OUT), TLS Unknown, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.0 (IN), TLS handshake, Server hello (2):
* TLSv1.0 (IN), TLS handshake, Certificate (11):
* TLSv1.0 (OUT), TLS alert, Server hello (2):
* SSL certificate problem: unable to get local issuer certificate
* Closing connection 0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
Is this the real Curl? And what do I do now?
From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
To: curl-library <curl-library_at_cool.haxx.se>
Sent: Sun, Jan 3, 2016 12:21 am
Subject: Re: help using Curl through Vagrant
On 1/2/2016 8:43 PM, Barry wrote:
I couldn't get it to work exactly as you specified, but I managed to figure out the following commands:
PS C:\HashiCorp\Vagrant\embedded\bin> curl -Verbose
cmdlet Invoke-WebRequest at command pipeline position 1
Supply values for the following parameters:
VERBOSE: GET https://atlas.hashicorp.com/data-science-toolbox/dst with 0-byte payload
VERBOSE: received -1-byte response of content type text/html; charset=utf-8
I've never seen curl output like that before. I don't like it. Microsoft has added curl and wget as aliases for Invoke-WebRequest in Powershell 5 (unclear about 4). They already used iwr as an alias, that should have been enough. Somehow I missed the news on this. 
So what you're seeing isn't curl output. Powershell isn't really running curl, it's running it's own web requester. You should be able to run the real curl in Powershell if it's in the current directory by prefixing it with .\ like this:
If you want to run it in Powershell using the path use & to execute it like this:
& "C:\HashiCorp\Vagrant\embedded\bin\curl.exe" -v --cacert "C:\HashiCorp\Vagrant\embedded\cacert.pem" "https://atlas.hashicorp.com/data-science-toolbox/dst"
Please compare the file versions as I mentioned in my last reply. If they are not the same you will need to fix that (probably by reinstalling Vagrant 1.8.1).
PS C:\HashiCorp\Vagrant\embedded\bin> vagrant up C:\HashiCorp\Vagrant\embedded\cacert.pem
vagrant : The machine with the name 'C:\HashiCorp\Vagrant\embedded\cacert.pem' was not found configured for
At line:1 char:1
+ vagrant up C:\HashiCorp\Vagrant\embedded\cacert.pem
+ CategoryInfo : NotSpecified: (The machine wit... configured for:String) , RemoteException
+ FullyQualifiedErrorId : NativeCommandError
this Vagrant environment.
Now what do I do?
Should I indeed be using PowerShell? Or should I open a VM manually in VirtualBox? (I've never used a VM before, so I'd be learning how from scratch.)
Those questions are outside the scope of this mailing list. Strictly speaking this mailing list is for libcurl, the library the curl tool uses. Though an occasional curl tool question will come in and someone may answer it. For future curl questions please post to curl-users  and for vagrant post to their mailing list .
Since I'm writing though I will tell you the problem with the command you are using is that you are specifying the certificate file as the machine you want to start which doesn't make any sense. Also, I use vagrant from the Windows command prompt and it works fine. You may want to try that instead of Powershell. To get it running should be as simple as:
vagrant init data-science-toolbox/dst
-------------------------------------------------------------------List admin: http://cool.haxx.se/list/listinfo/curl-libraryEtiquette: http://curl.haxx.se/mail/etiquette.html
List admin: http://cool.haxx.se/list/listinfo/curl-library
Received on 2016-01-04