7
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

bundle時にgitプロトコルじゃなくてhttpsを使うようにする件

Posted at

githubと通信する時にhttpsを使おう

bundler 1.13.0から、Gemfileのbundleをするときにhttpsを使わないとWarningが出るようになりました。

まあいいやと放置してたんですが、他メンバーとのGemfile.lockに差分が出てうざいので修正しました。
(:httpsより:gitの方がそれっぽいから:gitのが好きなんだけど!!)

主なエラー

主にbundleしたときなどに、Gemfile.lock内に以下のようなremote先があると怒られます。

Gemfile.lock
remote: git://hogehoge

https通信じゃないので駄目よ!という。

対応方法

以下のようなコマンドを普通にターミナル上でうつことでhttps化できるそうです。

bundle config github.https true

bundle config でbundleするときの設定をいじれます(正直あんまりいじったことない汗)。
上記のようなコマンドをちょちょいとうつと、https化できます。
念のためbundle configなどで確認しておいたほうがいいかも。

あ、あと、これの後に、必ずbundle installしなおしてください。

参考

bundler 1.13.0でGemfileに:github... | 日々雑記

7
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
7
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?