2017-10-10 73 views
0

我剛剛碰到Vagrant,試圖通過入門指導https://www.vagrantup.com/intro/getting-started/index.html流浪了在Windows 7:錯誤設置證書驗證地點

潛水前到您的第一個項目,請安裝最新版本的流浪的。而且由於我們將使用VirtualBox作爲入門指南的提供者,請安裝它。

我的主機是Windows 7 x64Virtualbox5.1.14r112924。虛擬化已啓用:我成功使用Windows XP虛擬機。

所以我安裝了最新的Vagrant版本2.0.0。我更新Powershell2.05.0修復vagrant up沒有任何問題。

所以,從指令入門:

  1. vagrant init hashicorp/precise64:沒關係,文件Vagrantfile出現;
  2. vagrant up,入門說:

運行以上兩個命令後,你將不得不在VirtualBox的完全運行的虛擬機運行Ubuntu 12.04 LTS 64位。

但我看到:

E:\VM\v_demo>vagrant up 
Bringing machine 'default' up with 'virtualbox' provider... 
==> default: Box 'hashicorp/precise64' could not be found. Attempting to find and install... 
    default: Box Provider: virtualbox 
    default: Box Version: >= 0 
The box 'hashicorp/precise64' 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/hashicorp/precise64"] 
Error: error setting certificate verify locations: 
    CAfile: /mingw64/ssl/certs/ca-bundle.crt 
    CApath: none 

,並在我的工作文件夾下的文件樹:

| Vagrantfile 
| 
\---.vagrant 
    \---machines 
     \---default 
      \---virtualbox 
        vagrant_cwd 

互聯網搜索這個錯誤的顯示結果約curlиgit但他們這裏沒有使用。

有關從錯誤消息中嘗試vagrant login的建議也不清楚。截至https://www.vagrantup.com/docs/cli/login.html

命令說:流浪漢登錄

login命令用於與HashiCorp的流浪 雲服務器進行身份驗證。只有在您訪問受保護的 框或使用流浪股份時才需要記錄日誌。

登錄不是使用Vagrant的必要條件。絕大多數 Vagrant不需要登錄。只有某些功能(如 保護框或Vagrant共享)需要登錄。

我不認爲測試示例是私人的。 而且我無法在任何地方找到Create account按鈕。

我錯過了什麼?

UPD

Vagrantfile

Vagrant.configure("2") do |config| 
    config.vm.box = "hashicorp/precise64" 
    config.vm.box_download_insecure = true 
end 

config.vm.box_download_insecure = true沒有幫助:相同的結果。

UPD2 我已經找到了如何創建帳戶https://app.vagrantup.com/account/new(以前我用過的手機版)。 vagrant login沒有幫助:相同的結果

+0

嘗試加入'config.vm.box_download_insecure = TRUE;在vagrantfile –

+0

@FrédéricHenri,沒有幫助,同樣的結果。 – and1er

+0

捲曲/ wget的作爲其用於下載框,你可以運行'捲曲-O https://開頭hashicorp-files.hashicorp.com/precise64.box'下載盒 –

回答

1

實際的問題是代理服務器。 設置Windows環境變量https_proxy=http://192.168.x.xxx:3128解決了這個問題。

0

手動解決方案:

  1. 手動從https://hashicorp-files.hashicorp.com/precise64.box下載.box -file到本地文件夾local_box\precise64.box;
  2. 路徑添加到本地.box -file內Vagrantfile

    Vagrant.configure("2") do |config| 
    
        config.vm.box = "local_box/precise64.box" 
    
    end 
    
  3. vagrant up現在將按預期。

+0

我想你的解決方案,但我想知道,我做了一個名爲'local_box'新的文件夾中的'vagrant'文件夾? –

+0

@NickKing'local_folder'手動創建在'視窗7'只是在命令測試相對路徑。沒有必要 – and1er

相關問題