Ssh and adduser --disabled-login results in permission denied (publickey)


I have installed gitea on raspberry pi and had troubles getting it to work with ssh.
I followed a few tutorial on gogs / gitea and documentation on this site to run it as a linux service and with ssh enabled.

i write this topic to check if my understanding is correct and to help others facing the same problem.

I ran into the following problem:

pi@raspberrypi:~/bin $ git push -u origin master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights

I think the problem was caused by the adduser command with the option --disabled-login.
and that the problem could be prevented by replacing --disabled-login by --disabled-password.


With the following command a git user was made:
sudo adduser --disabled-login --gecos ‘Go Git Service’ git
–> this command is present in a lot of gitea and gogs tutorials.

This resulted in etc/shadow to be filled with:

to get ssh to work i needed to replace the ! by * to get it to work. ( using sudo vipw -s)
(exclamation -> astrix symbol)

Google revealed that ! means no login at all possible.
“*” means no login possible except via ssh.

My understanding is that --disabled-login results into “!”
and --disabled-password into “*”.

Is this correct ?

Kind regards, Marcel.