当你想去克隆一个别人github上的repository时,发现系统不让你动,提示你防火墙禁止对git://的访问,这时候就只能用https://来访问repository。
具体操作:
在终端中输入:
$ git config --global url."https://".insteadOf git://
一顿操作只有,你的.gitconfig中会多出一行参数设置:
[url "https://"]
insteadOf = git://
设置之后,就可以以后不管你在终端进行clone,使用git://,或者http://去访问别人的repository,两种方式都会默认变成http://的形式进行连接并正常的工作了。