Skip to content

Added ssh key to acount is greeted with Permission denied (publickey) #36172

@nicenotes

Description

@nicenotes

Description

Hi,

I've have been trying to figure out why this is happening to no avail.

Long story short, I created a new account -> created a repo -> added ssh pub key.
Than when trying to clone the repo I'm greeted with Permission denied (publickey).

The ssh -vvv confirms that the right key has been offered. Also ssh-add -l shows that the key is used.

docker logs -f show only the following message:

  • Connection closed by authenticating user git 123.123.123.123 port 49266 [preauth]

The only account that the ssh keys work fine is the first user that have been registered. For that user there are no problems with ssh keys. For all subsequent users added ssh keys are not working as expected and are only greeted with Permission denied (publickey) message. Extremely frustrating

I don't understand why this is happening.

This totally does not make any sense to me

Any idea how I could approach/debug this ?

Gitea Version

1.25

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker compose

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions