2017-08-03 17 views
6

企業のプロキシサーバーと自己署名入りのCA証明書の背後にある無効なコマンドを実行する際に問題が発生しています。環境変数HTTP_PROXY、HTTPS_PROXY、およびHTTP_NO_PROXY変数を構成しました。障害のあるCA証明書の設定

私はすべての企業証明書を含むJavaキーストアを持っています。私は、keytoolコマンドの-exportcertオプションを多数のオプションとともに使用しました。私はopensslコマンドを多数のオプションでも利用しており、結果として得られるファイルをバージュインストール内の組み込みRubyディレクトリ内の複数の場所に配置しました。

私は、Rubyとcurlの設定に関する情報を含む多くのサイトを読んだが、Vagrantコマンドを動作させるのに成功していない。私が見つけたすべての記事は、RubyとVagrantの組​​み込みコンポーネントとしてRubyを含むVagrantを活用する方法を理解できないカールオプションに焦点を当てています。

証明書をJavaキーストアから正しくエクスポートし、必要に応じて変換して結果ファイルを配置して、代理人が企業のプロキシを介してインターネットに正常に通信できるようにする方法を説明してください。

のWindows 7上の

ベイグラント1.9.5

ベイグラントインストールディレクトリC:\アプリ\ベイグラント\

C:\WorkArea> vagrant plugin install vagrant.proxyconf 

ERROR: SSL verification error at depth 3: self signed certificate in certificate chain (19) 
ERROR: Root certificate is not trusted (/C=US/O=xxx xxx/OU=xxx xxx Certification Authority/CN=xxx xxx Root Certification Authority 01 G2) 
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz) 

C:\WorkArea> vagrant up 

Bringing machine 'default' up with 'virtualbox' provider... 
==> default: Box 'puppetlabs/ubuntu-16.04-64-puppet' could not be found. Attempting to find and install... 
    default: Box Provider: virtualbox 
    default: Box Version: >= 0 
The box 'puppetlabs/ubuntu-16.04-64-puppet' could not be found or 
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/puppetlabs/ubuntu-16.04-64-puppet"] 
Error: SSL certificate problem: self signed certificate in certificate chain 
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. 
+0

あなたの 'Vagrantfile'情報を共有できますか? – Haranadh

答えて

3

あなたは、あなたが問題を解決しようとするために行った作業内容を説明しませんが、 correct locationにルート証明書を置いていないようです。

Vagrantをインストールしたディレクトリに移動し、ファイルembedded\cacert.pemを見つけて、企業証明書の内容をファイルに追加します。保存して操作を再試行してください。ルートCA証明書を適切にエクスポートした場合、それらはVagrantによって読み込まれ、接続が許可されます。

ファイルを結合しても動作させることができない場合は、vagrantSSL_CERT_FILE=/path/to/your/certs.pemを実行してみてください。これにより、企業証明書を適切にエクスポートしたことを検証できます。

+2

これは質問の答えになるはずです。証明書をエクスポートする方法のいくつかの明確化。 Internet Explorerを使用しているWindowsでは、「インターネットオプション」>「コンテンツタブ」>「証明書」ボタン>「信頼できるルート証明機関」タブ>証明書を選択>「エクスポート」ボタン>次へ> X.509'>ファイルの場所/名前を選択>次へ>終了。ファイルを右クリックし、選択したテキストエディタで開き、データをコピーして 'embedded \ cacert.pem'ファイルの最後に貼り付けます。この後、私はコンソールを介して悪影響にログインしなければならなかった。 – fujiiface

関連する問題