【问题标题】:Switch from git source protocol to encrypted https从 git 源协议切换到加密 https
【发布时间】:2016-12-27 08:34:40
【问题描述】:

根据这个github issue conversation 和这个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 unencrypted protocol:

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 (Apple Git-78)
(注意:git是通过Xcode安装的with developers tools)
此外,在我输入这些命令之前,我收到了四个与其他 gem 相关的警告。输入命令后,我仍然对这两个感到担忧。我查看了 "capybara" 和 "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) 

【问题讨论】:

    标签: git macos rubygems bundler


    【解决方案1】:

    原来是~/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' 让我可以安全地安装最新 gems 的 https 协议。额外奖励:当我gem list...

    【讨论】:

      猜你喜欢
      • 2022-01-23
      • 1970-01-01
      • 2014-01-30
      • 1970-01-01
      • 2016-05-22
      • 2019-05-28
      • 2011-07-11
      • 2012-10-18
      • 2016-06-29
      相关资源
      最近更新 更多