curl-library
Re: help using Curl through Vagrant
Date: Sat, 2 Jan 2016 20:43:32 -0500
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:
Uri: https://atlas.hashicorp.com/data-science-toolbox/dst
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
StatusCode : 200
StatusDescription : OK
Content :
<!DOCTYPE html>
<html>
<head>
<title>Vagrant box data-science-toolbox/dst | Atlas by HashiCorp</title>
<link href="//d250n10lsq5j8r.cloudfront.net/assets/application-8035895d3f4e3c83f1c3ee5e58...
RawContent : HTTP/1.1 200 OK
Status: 200 OK
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Request-Id: 14d99374-6262-4478-b6da-c0d5266fe959
X-Runtime: 0.190148
X-XSS-Pro...
Forms : {}
Headers : {[Status, 200 OK], [Vary, Accept-Encoding], [X-Content-Type-Options, nosniff], [X-Frame-Options, SAMEORIGIN]...}
Images : {@{innerHTML=; innerText=; outerHTML=<IMG class=logo src="//d250n10lsq5j8r.cloudfront.net/assets/logo-281fbeee371947350922033a5109806e.png">; outerText=; tagName=IMG;
class=logo; src=//d250n10lsq5j8r.cloudfront.net/assets/logo-281fbeee371947350922033a5109806e.png}}
InputFields : {}
Links : {@{innerHTML=<DIV class=mark>
<DIV class=brand><IMG class=logo src="//d250n10lsq5j8r.cloudfront.net/assets/logo-281fbeee371947350922033a5109806e.png"> </DIV></DIV>
<DIV class=name>Atlas </DIV>; innerText=
Atlas ; outerHTML=<A class=brand href="/"><DIV class=mark>
<DIV class=brand><IMG class=logo src="//d250n10lsq5j8r.cloudfront.net/assets/logo-281fbeee371947350922033a5109806e.png"> </DIV></DIV>
<DIV class=name>Atlas </DIV></A>; outerText=
Atlas ; tagName=A; class=brand; href=/}, @{innerHTML=Sign in; innerText=Sign in; outerHTML=<A class=button href="/session">Sign in</A>; outerText=Sign in; tagName=A;
class=button; href=/session}, @{innerHTML=Sign up & Tutorials; innerText=Sign up & Tutorials; outerHTML=<A class="button green" href="/tutorials">Sign up &
Tutorials</A>; outerText=Sign up & Tutorials; tagName=A; class=button green; href=/tutorials}, @{innerHTML=Documentation; innerText=Documentation; outerHTML=<A class=docs
href="/help">Documentation</A>; outerText=Documentation; tagName=A; class=docs; href=/help}...}
ParsedHtml : System.__ComObject
RawContentLength : 8136
PS C:\HashiCorp\Vagrant\embedded\bin> vagrant init data-science-toolbox/dst
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
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.)
-----Original Message-----
From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
To: curl-library <curl-library_at_cool.haxx.se>
Sent: Fri, Jan 1, 2016 5:21 pm
Subject: Re: help using Curl through Vagrant
On 1/1/2016 4:20 AM, Barry via curl-library wrote:
My specs are as follows:
AMD Athlon II 170u
2.00 gigahertz
2.75 gigabytes usable ram
370 gigabytes free hard drive space
802.11n WPA2-Personal 4GLTE
Netgear WNDA3100v2 N600 Wireless Dual Band USB Adaptor (driver 5.100.68.48)
Windows 8.1 pro (32 bit)
ESET Nod32 Antivirus 8.0.319.0
Oracle VirtualBox 4.3.28.100309
MLS OpenSSH 7.1.1.1
HashiCorp Vagrant 1.8.1
I'm trying to download the Data Science Toolbox from Atlas. I get the following error:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'data-science-toolbox/dst' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
vagrant : The box 'data-science-toolbox/dst' could not be found or
At line:1 char:1
+ vagrant up
+ ~~~~~~~~~~
+ CategoryInfo : NotSpecified: (The box 'data-s...not be found or:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, 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://atlas.hashicorp.com/data-science-toolbox/dst"]
Error: 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.
I was unable to reproduce using Vagrant 1.8.1 in Windows 7 x64 Enterprise. I didn't have any problems retrieving that box (vagrant init data-science-toolbox/dst & vagrant up). Vagrant 1.8.1 uses this version of curl:
---
C:\HashiCorp\Vagrant\embedded\bin\curl -V
curl 7.45.0 (i386-pc-win32) libcurl/7.45.0 OpenSSL/1.0.2a zlib/1.2.8 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp
scp sftp smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz
---
Vagrant sets CURL_CA_BUNDLE to this certificate bundle before running curl commands:
---
C:\HashiCorp\Vagrant\embedded\cacert.pem
## Certificate data from Mozilla as of: Wed Oct 28 04:12:04 2015
## Conversion done with mk-ca-bundle.pl version 1.25.
## SHA1: 6d7d2f0a4fae587e7431be191a081ac1257d300a
---
Do you get the same error if you try to access the website manually?
"C:\HashiCorp\Vagrant\embedded\bin\curl.exe" -v --cacert "C:\HashiCorp\Vagrant\embedded\cacert.pem" "https://atlas.hashicorp.com/data-science-toolbox/dst"
The closest thing related to what you describe is https://github.com/mitchellh/vagrant/issues/5739. We did at one point have a problem verifying some trust chains but it was fixed last year. If you upgraded Vagrant check if you are using older versions of those files. Maybe they weren't updated for some reason. If they are the same versions then you could give us the output of the above command.
-------------------------------------------------------------------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
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2016-01-03