Обсуждение: Git clone over git protocol fails
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
# 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.
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
# 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
Cloning into 'postgresql'...
fatal: remote error: access denied or repository not exported: /postgresql.git
# Using the ssh protocol url from
# https://git.postgresql.org/gitweb/?p=postgresql.git;a=summary
# https://git.postgresql.org/gitweb/?p=postgresql.git;a=summary
$ 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.
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.
Cloning into 'postgresql'...
remote: Enumerating objects: 1081430, done.
...
The docs page mentioned in the first command needs to be fixed for sure.
Best regards,
Gurjeet
> 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
Вложения
> 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
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
On Thu, Oct 23, 2025 at 7:59 AM Nathan Bossart <nathandbossart@gmail.com> wrote: > LGTM +1 --Jacob
>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
>> 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
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