gitproxygnomejhbuild

Modify the url automatically when using git clone


JHBuild uses the git protocoal instead of https for cloning the files. I am working in a proxy environment which prevents the cloning using the git protocol.

git url of sample gnome repo : git://git.gnome.org/gnome-common

http url of sample gnome repo: http://git.gnome.org/browse/gnome-common.

Is there any way to transform the git url to https format automatically when JHBuild executes the clone command.


Solution

  • The gnome moduleset defines git.gnome.org as using git:// but this can be changed in the jhbuildrc file.

    Add the following line in jhbuildrc.

    repos['git.gnome.org'] = 'http://git.gnome.org/browse/'

    The file is present usually in ~/.config. Create jhbuildrc file if not present.