# error: invalid key with file url insteadOf

2 messages from 2018-07-20 to 2018-07-20. Participants: Basin Ilya, Junio C Hamano.
Thread: https://gitlist.dev/t/48929

## Basin Ilya, 2018-07-20 21:27

Subject: error: invalid key with file url insteadOf
Message-ID: <7ac8e749-0636-cac4-35c7-1226f340e72f@gmail.com>
URL: https://gitlist.dev/e/7ac8e749-0636-cac4-35c7-1226f340e72f%40gmail.com

```
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, 2018-07-20 21:37

Subject: Re: error: invalid key with file url insteadOf
Message-ID: <xmqqk1ppa8rc.fsf@gitster-ct.c.googlers.com>
URL: https://gitlist.dev/e/xmqqk1ppa8rc.fsf%40gitster-ct.c.googlers.com
In-Reply-To: <7ac8e749-0636-cac4-35c7-1226f340e72f@gmail.com>

```
Basin Ilya <basinilya@gmail.com> writes:

> 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.

```
