Обсуждение: Git clone over git protocol fails

Поиск
Список
Период
Сортировка

Git clone over git protocol fails

От
Gurjeet Singh
Дата:
I'm not sure if it's expected because of some recent infrastructure changes, but cloning Postgres repo with the following commands fails.

# Using command from Postgres docs at
# https://www.postgresql.org/docs/current/git.html
$ git clone git://git.postgresql.org/git/postgresql.git
Cloning into 'postgresql'...
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

# Removing the /git/ part, to match ssh protocol url on
# https://git.postgresql.org/gitweb/?p=postgresql.git;a=summary
$ git clone git://git.postgresql.org/postgresql.git
Cloning into 'postgresql'...
fatal: remote error: access denied or repository not exported: /postgresql.git

$ git clone ssh://git@git.postgresql.org/postgresql.git
Cloning into 'postgresql'...
Permission denied on repository for user gurjeet
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

# Using the https protocol works
$ git clone https://git.postgresql.org/git/postgresql.git
Cloning into 'postgresql'...
remote: Enumerating objects: 1081430, done.
...

IIRC, cloning and fetching using  git://git.postgresql.org/git/postgresql.git URL worked at least a few months ago (I have a repo from back then where I used the git:// protocol instead of https).

The docs page mentioned in the first command needs to be fixed for sure.

Best regards,
Gurjeet

Re: Git clone over git protocol fails

От
Daniel Gustafsson
Дата:
> On 23 Oct 2025, at 01:17, Gurjeet Singh <gurjeet@singh.im> wrote:
>
> I'm not sure if it's expected because of some recent infrastructure changes, but cloning Postgres repo with the
followingcommands fails. 

I don't remember the exact details (and an archive search is failing me) but
I seem to recall support for the Git protocol being removed a while back.

> The docs page mentioned in the first command needs to be fixed for sure.

If the Git protocol is indeed unsupported we need something like the attached
backpatched all the way.

--
Daniel Gustafsson


Вложения

Re: Git clone over git protocol fails

От
Daniel Gustafsson
Дата:
> On 23 Oct 2025, at 16:41, Daniel Gustafsson <daniel@yesql.se> wrote:

> I don't remember the exact details (and an archive search is failing me) but
> I seem to recall support for the Git protocol being removed a while back.

This was just confirmed off-list..

>> The docs page mentioned in the first command needs to be fixed for sure.
>
> If the Git protocol is indeed unsupported we need something like the attached
> backpatched all the way.

..so unless objected to this seems like an appropriate fix.

--
Daniel Gustafsson




Re: Git clone over git protocol fails

От
Nathan Bossart
Дата:
On Thu, Oct 23, 2025 at 04:53:30PM +0200, Daniel Gustafsson wrote:
>> If the Git protocol is indeed unsupported we need something like the attached
>> backpatched all the way.
> 
> ..so unless objected to this seems like an appropriate fix.

LGTM

-- 
nathan



Re: Git clone over git protocol fails

От
Jacob Champion
Дата:
On Thu, Oct 23, 2025 at 7:59 AM Nathan Bossart <nathandbossart@gmail.com> wrote:
> LGTM

+1

--Jacob



Re: Git clone over git protocol fails

От
Gurjeet Singh
Дата:
>On Thu, Oct 23, 2025 at 7:41 AM Daniel Gustafsson <daniel@yesql.se> wrote:
>> On 23 Oct 2025, at 01:17, Gurjeet Singh <gurjeet@singh.im> wrote:

>> The docs page mentioned in the first command needs to be fixed for sure.

> If the Git protocol is indeed unsupported we need something like the attached
backpatched all the way.

LGTM

Best regards,
Gurjeet

http://Gurje.et

Re: Git clone over git protocol fails

От
Tom Lane
Дата:
Daniel Gustafsson <daniel@yesql.se> writes:
>> On 23 Oct 2025, at 16:41, Daniel Gustafsson <daniel@yesql.se> wrote:
>> I don't remember the exact details (and an archive search is failing me) but
>> I seem to recall support for the Git protocol being removed a while back.

> This was just confirmed off-list..

Yeah, I also recall being told that, but couldn't find it in the
archives either.  I think it was a matter of cutting load and/or
attack surface on the repo server.

> ..so unless objected to this seems like an appropriate fix.

WFM.

            regards, tom lane