Skip to content

Wrong default for [server].SSH_ROOT_PATH #36792

@jedix

Description

@jedix

Description

After not setting SSH_ROOT_PATH in the [server] section and then trying to add an public SSH key, the following error occurs:

AddPublicKey, addKey: mkdir /home/git: permission denied

But the home directory for the user git is not /home/git but rather /srv/data/git in my case.

According to the documentation, SSH_ROOT_PATH defaults to ~/.ssh, which would be fine.
But in the administration interface (gitea-url/-/admin/config), it shows SSH_ROOT_PATH to be /home/git/.ssh

Setting it manually to ~/.ssh fixes the issue.

Gitea Version

1.25.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/jedix/d72a8fa06d86b7910f544fcd3d9a1509

Screenshots

Image Image

Git Version

2.53.0

Operating System

Fedora 43

How are you running Gitea?

Downloaded the binary and running as a systemd service.

Database

MySQL/MariaDB

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