LoginSignup
12
12

More than 5 years have passed since last update.

GitでリモートのURLをgit://~からhttps://~へ自動変換する

Posted at

gitでリモートリポジトリからソースを取ってくる際、proxyの都合上http/httpsで取りたいときがあります。
CLIでコマンドを打つときは手で置き換えたらいいのですが、
パッケージ管理ツール等で定義ファイルに書かれている場合、いちいち書き換えるのが面倒な場合もあります(僕はbowerで難儀しました)。

そういう場合はgitの設定の方を書き換えましょう。

$ git config --global url."https://".insteadOf "git://"

URLの"git://"を"https://"に置き換えて実行してくれます。

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