How to convert `git:` urls to `http:` urls

前端 未结 4 1666
轻奢々
轻奢々 2020-11-27 08:57

I\'m working behind an http proxy. I\'m trying to clone Android\'s source tree using their \"repo\" tool.

This tool insists on using git:// URLs, even

4条回答
  •  一生所求
    2020-11-27 09:37

    Here's an example of rewriting the default protocol for GitHub:

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

    Git documentation for url..insteadOf:

    git config [--global] url..insteadOf

    Any URL that starts with this value will be rewritten to start, instead, with . When more than one insteadOf strings match a given URL, the longest match is used.

提交回复
热议问题