LoginSignup
0
3

More than 5 years have passed since last update.

ネットワークに弱いプログラマがvagrantの導入でハマったところ

Last updated at Posted at 2017-12-06

#vagrant upでエラー
自分でVirtualBoxのGUIで作ったboxをupしようとしたらエラーに。。。

default: Warning: Authentication failure. Retrying...

というログが無限に出続けるパターンです。
これ、ゲストOSにsshdが入っていませんでした。。

#vagrant box addでSSLのエラー

Error: SSL certificate problem: unable to get local issuer certificate

というエラーです。
力技ですが、--insecureオプションを追加することでhttpで取得できます。

vagrant box add --insecure -c ubuntu/trusty64

#proxy環境下でvagrant plugin installができない時の対処法
基本はset http_proxyで環境変数を設定すれば問題ありません。
が、なぜか設定が反映されません。
私、PowerShellで実行していたのですが、setはSet-Variableコマンドのaliasでまさかの環境変数ではなくシェル変数を設定していました。
それに気づかずに編み出したのが、gemrcにプロキシの情報を書いちゃうというものです。
というのもvagrant plugin installの中身はgem installだからです。
HashiCorp\Vagrant\embedded\etc\gemrcに以下の行を追加します。

http_proxy: http://<HOST>:<PORT>
https_proxy: http://<HOST>:<PORT>
0
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
3