Gitea ssh on suse linux

Hello,

I installed gitea on suse.

sudo zypper addrepo https://download.opensuse.org/repositories/devel:tools:scm/openSUSE_Leap_15.3/devel:tools:scm.repo
sudo zypper refresh
sudo zypper install gitea
sudo systemctl enable gitea
sudo systemctl start gitea

Gitea is running well and i already put a few repositories there. Though i’m not sure what to do to access the repositories over SSH (so far only use HTTP).

The SSH configuration looks like this
gitea ssh

I looked into /etc/passwd and found the following user

gitea:x:465:464:Gitea daemon:/usr/share/gitea:/bin/bash

Then i tried to follow the FAQ here https://docs.gitea.io/en-us/help/faq/

However when i try to login over SSH it asks me a for a password. I tried logging in with gitea@ as well since i didn’t see a git user in /etc/passwd but that also asked for a password. I don’t have the password of the gitea user as it was automatically setup by the zypper package manager.

What can i do to login with SSH? (primarely used for CI, but developers might also want to use SSH)`
Thanks for the help

passwd gitea
and set a dummy password
worked for me

Have you setup SSH key in your Gitea user account? If not, I think it will default to password authentication. You should not set a password for the gitea account.

If you have, are you able to SSH into other users on system using SSH key? I am wondering if public key authentication is disabled (I think it is PubkeyAuthentication in /etc/ssh/sshd_config).

Why the “You should not set a password for the gitea account” part?
Setting any password on the user gitea on opensuse, fixes logging with ssh keys (I have set pubkeyauthentication to on and password authentication set to off). It’s probably OpenSUSE’s fault because gitea works fine on Debian, but on OpenSUSE I had to use this hack to fix SSH login

Just for security purposes. If account has no password, it is one less thing to worry about. If that’s the only way it will work on OpenSUSE, then it should be fine as long as password is strong enough.