Description
Description
I followed the documentation for preparing the environment which includes this
# On Ubuntu/Debian:
adduser \
--system \
--shell /bin/bash \
--gecos 'Git Version Control' \
--group \
--disabled-password \
--home /home/git \
git
I created a user named "gitea" and I was installing on a Debian server. I couldn't ssh authenticate with this user. All of the file permissions up and down were correct, sshd configuration in good shape, etc. Following the log, like sudo journalctl --unit ssh --pager-end --follow
showed that the problem from the sshd server was:
sshd[152357]: User gitea not allowed because account is locked
My sshd_config disallows password authentication, so I'm not sure why having a password on the user matters, but it apparently the user needs some sort of password in order to not be locked. This was solved by creating an unusable password for the gitea
user like this:
sudo usermod -p '*' gitea
(courtesy of this SO answer)
Change the account to have no password, but be unlocked. An account has no password if the password hash in the password database is not the hash of any string. Traditionally, a one-character string such as * or ! is used for that.
Gitea Version
1.23.1 built with GNU Make 4.3, go1.23.4 : bindata, sqlite, sqlite_unlock_notify
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
Debian GNU/Linux 12 (bookworm)
How are you running Gitea?
Installation from binary, running as service.
Database
SQLite