# Wrong error message when cloning from http gitlab (and everything still works anyway)

3 messages from 2024-08-22 to 2024-08-28. Participants: Marlon Regenhardt, Junio C Hamano, Johannes Schindelin.
Thread: https://gitlist.dev/t/61992

## Marlon Regenhardt, 2024-08-22 10:40

Subject: Wrong error message when cloning from http gitlab (and everything still works anyway)
Message-ID: <DB8P194MB0870877CBCB0576CCCB520C0E08F2@DB8P194MB0870.EURP194.PROD.OUTLOOK.COM>
URL: https://gitlist.dev/e/DB8P194MB0870877CBCB0576CCCB520C0E08F2%40DB8P194MB0870.EURP194.PROD.OUTLOOK.COM
In-Reply-To: <DB8P194MB08704DAF8B33C67FCCE43EBDE08F2@DB8P194MB0870.EURP194.PROD.OUTLOOK.COM>

```
Hi,

I'm currently setting up my new work PC (now Windows 11) and got a weird error message when cloning our repository:

 - run git clone on an http GitLab instance, in my case I ran `git clone http://gitlab.company-local-domain.de/group/project LocalRepo-Name`
   Note:
    - http, not https
    - GitLab
 - Get the following error message:
   fatal: Unencrypted HTTP is not supported for GitHub. Ensure the repository remote URL is using HTTPS.
 - Get prompted for and enter credentials
 - Get warning about redirecting to .git URL
 - Cloning commences and finishes successfully

Our GitLab is only reachable from the internal network, so adding https hasn't been a priority for our admins.
There is no GitHub involved at all, not sure where that comes from.
Except for the error message, everything works fine.
The message only appeared the first time I cloned something from this domain. From the second time, everything appeared as expected again.
git version shows 2.46.0.windows.1

Best regards
Marlon Regenhardt
```

## Junio C Hamano, 2024-08-22 15:40

Subject: Re: Wrong error message when cloning from http gitlab (and everything still works anyway)
Message-ID: <xmqqh6bcva55.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqh6bcva55.fsf%40gitster.g
In-Reply-To: <DB8P194MB0870877CBCB0576CCCB520C0E08F2@DB8P194MB0870.EURP194.PROD.OUTLOOK.COM>

```
Marlon Regenhardt <marlon.r@hotmail.de> writes:

> I'm currently setting up my new work PC (now Windows 11) and got a weird error message when cloning our repository:
>
>  - run git clone on an http GitLab instance, in my case I ran `git clone http://gitlab.company-local-domain.de/group/project LocalRepo-Name`
>    Note:
>     - http, not https
>     - GitLab
>  - Get the following error message:
>    fatal: Unencrypted HTTP is not supported for GitHub. Ensure the repository remote URL is using HTTPS.

A funny thing is that

    $ git grep "Unencrypted HTTP is not"

in the entire codebase of Git gives no hits.  If this message is
coming from some add-on Git-for-Windows ships with, a better place
to raise this issue would be Git-for-Windows project's tracker page

  https://github.com/git-for-windows/git/issues

than here on this list.  I tried

  https://github.com/search?q=org%3Agit-for-windows%20%22Unencrypted%20HTTP%22&type=code

to see if they have that string, which found no hits, so there may
be some other components, other than Git project ships and
Git-for-windws project adds, that is in play.

```

## Johannes Schindelin, 2024-08-28 15:53

Subject: Re: Wrong error message when cloning from http gitlab (and everything still works anyway)
Message-ID: <1a2fa9e6-fafa-8981-568c-007e4b6c8896@gmx.de>
URL: https://gitlist.dev/e/1a2fa9e6-fafa-8981-568c-007e4b6c8896%40gmx.de
In-Reply-To: <xmqqh6bcva55.fsf@gitster.g>

```
Hi Junio & Marlon,

On Thu, 22 Aug 2024, Junio C Hamano wrote:

> Marlon Regenhardt <marlon.r@hotmail.de> writes:
>
> > I'm currently setting up my new work PC (now Windows 11) and got a weird error message when cloning our repository:
> >
> >  - run git clone on an http GitLab instance, in my case I ran `git clone http://gitlab.company-local-domain.de/group/project LocalRepo-Name`
> >    Note:
> >     - http, not https
> >     - GitLab
> >  - Get the following error message:
> >    fatal: Unencrypted HTTP is not supported for GitHub. Ensure the repository remote URL is using HTTPS.
>
> A funny thing is that
>
>     $ git grep "Unencrypted HTTP is not"
>
> in the entire codebase of Git gives no hits.  If this message is
> coming from some add-on Git-for-Windows ships with, a better place
> to raise this issue would be Git-for-Windows project's tracker page
>
>   https://github.com/git-for-windows/git/issues
>
> than here on this list.  I tried
>
>   https://github.com/search?q=org%3Agit-for-windows%20%22Unencrypted%20HTTP%22&type=code
>
> to see if they have that string, which found no hits, so there may
> be some other components, other than Git project ships and
> Git-for-windws project adds, that is in play.

Seems that Marlon found the correct project to fix this:
https://github.com/git-ecosystem/git-credential-manager/pull/1694

Now we only need to find funding for non-security-related work on GCM and
we'll be good.

Ciao,
Johannes

```
