Hatena::Groupvim

vimまっしぐら★ このページをアンテナに追加 RSSフィード

tokoromのその他の日記

2011-06-12

VundleのBundleInstallでSSLのエラーが出る場合の対処

14:41

BundleInstallで HTTP request failed

VundleでBundleInstallしたとき、いくつかのpluginでエラーが出てしまった。

例えば

Bundle 'quickrun'

に対して、

fatal: HTTP request failed

Cloning into /home/ytokoro/.vim/bundle/quickrun...

error: SSL certificate problem, verify that the CA cert is OK. Details:

error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/vim-scripts/quickrun.git/info/refs

というエラーが出ていた。https://... からファイルを取得する際に証明書のチェックでひっかかている模様。

Vundleのソースをチェック

ひとまず証明書のチェックをしないようにすれば良さそうではあるものの、どこでそれをやってらよいかわからず、vundle.gitのソースを覗いてみる。

~/vimfiles/vundle.git/autoload/vundle/installer.vim

 64 func! s:sync(bang, bundle) abort
 65   let git_dir = expand(a:bundle.path().'/.git/')
 66   if isdirectory(git_dir)
 67     if !(a:bang) | return 0 | endif
 68     let cmd = 'cd '.shellescape(a:bundle.path()).' && git pull'
 69   else
 70     let cmd = 'git clone '.a:bundle.uri.' '.shellescape(a:bundle.path())
 71   endif
 72   silent exec '!'.cmd
 73   return 1
 74 endf

どうやらgitのほうで設定するしかなさそうということがわかった。

gitで証明書チェックをしない設定

どうやら、.gitconfig の http.sslVerify を false に設定すれば良いみたいなので早速設定。

[http]
    sslVerify = false

これで無事にhttpsのところからも :BundleInstall ができるようになりました。

参考

もっときちんと

CAの場所を指定してやる方法のほうがいいかも。