[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: Re: persistent-https, url insteadof, and `git submodule`
From: Dennis Kaarsemaker <dennis () kaarsemaker ! net>
Date: 2017-05-19 21:43:06
Message-ID: 1495230186.19473.7.camel () kaarsemaker ! net
[Download RAW message or body]
On Fri, 2017-05-19 at 14:57 -0500, Elliott Cable wrote:
> Set up `persistent-https` as described in the [README][]; including the
> ‘rewrite https urls' feature in `.gitconfig`:
>
> [url "persistent-https"]
> insteadof = https
> [url "persistent-http"]
> insteadof = http
>
> Unfortunately, this breaks `git submodule add`:
>
> > git submodule add https://github.com/nodenv/nodenv.git \
> ./Vendor/nodenv
> Cloning into '/Users/ec/Library/System Repo/Vendor/nodenv'...
> fatal: transport 'persistent-https' not allowed
> fatal: clone of 'https://github.com/nodenv/nodenv.git' into
> submodule path '/Users/ec/Library/System Repo/Vendor/nodenv' failed
>
> Presumably this isn't intended behaviour?
It actually is. git-submodule sets GIT_PROTOCOL_FROM_USER to 0, which
makes git not trust any urls except http(s), git, ssh and file urls
unless you explicitely configure git to allow it. See the
GIT_ALLOW_PROTOCOL section in man git and the git-config section it
links to.
D.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic