Обсуждение: cannot access to postgres-git via ssh

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

cannot access to postgres-git via ssh

От
Kyotaro Horiguchi
Дата:
Hello.

I'm facing a difficulty on cloning a repository via ssh.

I understand that git repository can be accessed via http, git and ssh
protocol, and ssh access uses the ssh public key registered in
community account profile. I registered one in ecdsa-sha2-nistp256
that I believe the server accepts.  I waited for more than 1 hour
since key registration until the operation.

If I ran the following command, it would fail.

===
$ git clone ssh://git@git.postgresql.org/postgresql.git postgresql
Cloning into 'postgresql'...
git@git.postgresql.org: Permission denied (publickey).
fatal: Could not read from remote repository.

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

In detail it is failing as the following.

GIT_SSH_COMMAND="ssh -vvv" git clone ssh://git@git.postgresql.org/postgresql.git
...
debug1: Offering public key: horiguti@cent8 ECDSA SHA256:z...QM agent
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51

So the server just refuses the key with SSH_MSG_USERAUTH_FAILURE. The
key in the debug1 line looks the correct one.

Any comments on the operation above, or on how to diagnose that
further are welcome.  In other words, please help me!

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



Re: cannot access to postgres-git via ssh

От
Magnus Hagander
Дата:
On Thu, Aug 26, 2021 at 9:34 AM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
>
> Hello.
>
> I'm facing a difficulty on cloning a repository via ssh.
>
> I understand that git repository can be accessed via http, git and ssh
> protocol, and ssh access uses the ssh public key registered in
> community account profile. I registered one in ecdsa-sha2-nistp256
> that I believe the server accepts.  I waited for more than 1 hour
> since key registration until the operation.

Hi!

ssh based access only works for repositories where you have explicit
permissions, it does not support anonymous access -- that has to be
over https (recommended) or git.

And specifically, the postgresql.git repo mirror only allows anonymous access.

-- 
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/



Re: cannot access to postgres-git via ssh

От
Kyotaro Horiguchi
Дата:
At Thu, 26 Aug 2021 16:34:25 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in 
> Hello.

Hmm. I found www@postgresql.org more appropriate place to ask this
question.

Please ignore this.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center