threads / discuss / 61992

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

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

## tl;dr

3 messages between Aug 22, 2024 and Aug 28, 2024.

replies: 2people: 3as markdown or json

Marlon Regenhardt· Aug 22, 2024, 10:40 UTC · lore
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· Aug 22, 2024, 15:40 UTC · re: Marlon Regenhardt · lore

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

Marlon Regenhardt <marlon.r@hotmail.de> writes:
Show 8 quoted lines
> 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· Aug 28, 2024, 15:53 UTC · re: Junio C Hamano · lore

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

Hi Junio & Marlon,
On Thu, 22 Aug 2024, Junio C Hamano wrote:
Show 28 quoted lines
> 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

← back to recent threads