LoginSignup
201
199

More than 5 years have passed since last update.

gitプロトコルが使えない環境での、たった一つの重要な設定

Posted at

開発環境によっては、セキュリティー()を高めるために、利用可能なプロトコルがしぼられている場合があります。例えば、http/httpsは使えるけどgitプロトコルは使えないといった状況です。

ただし、イマドキのライブラリ管理系のツールを使うと、gitプロトコルを使ってgithubからcloneしたがるものが多く、当然ながらエラーになって困ります。

そんなとき、gitプロトコルでリクエストをする場合に、自動的にhttpsとして実行するように変更すると幸せになれます。

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

JavaScriptのbowerやVimのNeoBundleとかで動作確認済みです。
お試しあれ。

参考
(http://stackoverflow.com/questions/4891527/git-protocol-blocked-by-company-how-can-i-get-around-that/10729634#10729634)

201
199
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
201
199