ruby - 运行 "bundle install"将 Gemfile.lock 中的 "git://"更改为 "https://"

标签 ruby git bundler

当我运行 bundle install 时,Gemfile.lock 中以 remote: git://github.com 开头的 URL 更改为远程:https://github.com。因为我正在与其他人一起开发一个项目,所以我无法提交这些更改。如何强制 Bundler 使用 git 协议(protocol)?

其他人似乎有相反的问题,想要使用 https 而不是 git。我尝试使用以下命令,基于 this answer ,但无济于事:

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

我正在使用 Bundler 1.7.0 和 RVM。

最佳答案

升级到 Bundler 1.7.2 似乎可以解决问题。

关于ruby - 运行 "bundle install"将 Gemfile.lock 中的 "git://"更改为 "https://",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25794846/

相关文章:

ruby-on-rails - 构建gem原生扩展失败-解决办法

ruby-on-rails - Rails - Ruby 更新到 2.5.3 后出现 "Required ruby-2.3.3 is not installed."

ruby-on-rails - 使用 Google API 客户端,如何创建客户端

ruby-on-rails - Ruby on Rails 中 Look#input 中的语法错误

git rebase 不显示 merge 提交

git - 你能在 git 中查看聚合变更集吗?如果是这样,如何?

ruby-on-rails - 为什么 rails 默认忽略 .bundle ?

c++ - c++ using 声明的 ruby​​ 等价物是什么?

ruby-on-rails - 在 S3 中复制/重命名非拉丁命名文件时出现 AWS::S3::SignatureDoesNotMatch 异常

git - "git reset --hard"与 "git reset --hard HEAD"相同吗?