从 git 源协议切换到加密 https

Switch from git source protocol to encrypted https

根据这个 github issue conversation and this answer to a relevant SO question 我已经执行了以下两个命令:

$ bundle config --global github.https true
$ git config --global url."https://github.com".insteadOf git://github.com

但是当我使用 bundle install 时,我仍然收到以下警告消息:gits 未加密协议:

The git source uses the `git` protocol, which transmits data without encryption.
Disable this warning with `bundle config git.allow_insecure true`,
or switch to the `https` protocol to keep your data secure.

对于两者:
git://github.com/jnicklas/capybara.git
git://github.com/thoughtbot/shoulda-matchers.git

物有所值:
捆绑器版本 1.13.6
git 版本 2.10.1(苹果 Git-78)
(注意:git 是通过 Xcode with developers tools 安装的)
此外,在我输入这些命令之前,我收到了四个与其他 gem 相关的警告。输入命令后,我仍然对这两个有警告。我查看了“capybara" and "shoulda-matchers”的 README.md 文件,但没有发现任何表明此问题的解决方案或原因的信息。
最后,bundle install 报告:

Using shoulda-matchers 3.0.1 from git://github.com/thoughtbot/shoulda-matchers.git (at master@db67d27)  
Using capybara 2.6.0.dev from git://github.com/jnicklas/capybara.git (at master@e6886de) 

原来是~/project/Gemfile指定了github来源:

group :test do
  gem 'shoulda-matchers', :git => 'git://github.com/thoughtbot/shoulda-matchers.git'
  gem 'capybara', :git => 'git://github.com/jnicklas/capybara.git'
end

删除 , :git => 'PATH' 可以让我安全地安装最新 gem 的 https 协议。额外的好处:当我 gem list 时宝石现在也会出现... FWIW:这不是我从头开始编写的项目,我只是在帮助别人解决他们的问题,但现在我知道了!