3 ms·
I tried that at first but the issue was that URLs didn't map perfectly. A url like git://freedesktop.org/harfbuzz.git mapped to https://git.freedesktop.org/proj
by hashhar 10y ago
I tried that at first but the issue was that URLs didn't map perfectly. A url like git://freedesktop.org/harfbuzz.git mapped to https://git.freedesktop.org/projects/harfbuzz.git https://git.freedesktop.org/projects/harfbuzz.git or something to that end.
- avar 10y agoIt doesn't have to map perfectly as long as both end in the same suffix. Test with: git -c url.https://git.freedesktop.org/projects/.insteadOf=git://freedesktop.org/ clone git://freedesktop.org/harfbuzz.git Cloning into 'harfbuzz'... fatal: unable to access 'https://git.freedesktop.org/projects/harfbuzz.git/': Failed to connect to git.freedesktop.org port 443: Connection refused Then set it in your config: git config --global url.https://git.freedesktop.org/projects/.insteadOf git://freedesktop.org/ And now anything on your system cloning or fetching git://freedesktop.org/harfbuzz.git will use https://git.freedesktop.org/projects/harfbuzz.git https://git.freedesktop.org/projects/harfbuzz.git instead.
- hashhar 10y agoWow. Thanks. I guess it will work for all git commands (including the clone --recursive) ones? EDIT: Yup. Works great. I'll check with jhbuild and add to the wiki if it works.
- jwilk 10y agoYou can copy&paste config for freedesktop.org (and other popular git repos) from here: https://github.com/jwilk/https-everygit/blob/master/gitconfig https://github.com/jwilk/https-everygit/blob/master/gitconfi...
- hashhar 10y agoDidn't used to work with git submodules back when I tried. It's been quite a long time so I can't say if things have changed.