threads / discuss / 48929

error: invalid key with file url insteadOf

Subject: error: invalid key with file url insteadOf

## tl;dr

2 messages between Jul 20, 2018 and Jul 20, 2018.

replies: 1people: 2as markdown or json

Basin Ilya· Jul 20, 2018, 21:27 UTC · lore
Hi.
I'm trying to make the Cygwin Git understand Mingw-style repo urls:
    git config --global \
      file:///cygdrive/c.insteadOf \
      file:///C:
But this fails with:
    error: invalid key: file:///cygdrive/c.insteadOf
Manually editing ~/.gitconfig works fine:
    [url "file:///cygdrive/c"]
            insteadOf = file:///C:
    il@MAR2 /cygdrive/c/progs/maven/maven-scm/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe
    $ LANG=C cmd.exe /X /C "git clone file:///C:/progs/maven/maven-scm/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/target/git_copy checkin-nobranch"
    Cloning into 'checkin-nobranch'...
    warning: You appear to have cloned an empty repository.
Junio C Hamano· Jul 20, 2018, 21:37 UTC · re: Basin Ilya · lore

Re: error: invalid key with file url insteadOf

Basin Ilya <basinilya@gmail.com> writes:
Show 11 quoted lines
> Hi.
>
> I'm trying to make the Cygwin Git understand Mingw-style repo urls:
>
>     git config --global \
>       file:///cygdrive/c.insteadOf \
>       file:///C:
>
> But this fails with:
>
>     error: invalid key: file:///cygdrive/c.insteadOf
Understandable.
> Manually editing ~/.gitconfig works fine:
>
>     [url "file:///cygdrive/c"]
>             insteadOf = file:///C:

How about spelling what you want to happen on the command line version the same way as your "manual" version? I.e.

	git config --global \
		url.file:///cygdrive/c.insteadOf \
		file:///C:
notice the lack of "url." in your version.

← back to recent threads