Did setup a Git server on (MX) Linux, which can be used via SSH as user “git”.
git and openssh;sudo adduser --system --home /home/git --shell /usr/bin/git-shell --group git
cd /home/git && sudo -u git bash);mkdir .ssh && chmod 0700 .ssh touch .ssh/authorized_keys && chmod 0600 .ssh/authorized_keys
.ssh/authorized_keys, for example by:cat /from/somehow/id_rsa.pub >> .ssh/authorized_keys
~/git-shell-commands/no-interactive-login for testing authentication (test from extern with: ssh git@gitsrv or ssh git);Finally init an “example” project (as user “git”, see above)
mkdir ~/example.git git init --bare ~/example.git
and push something in, may be a bare “example” repository located on another network host:
git clone --mirror file:///home/repos/example example.git cd example.git git push --mirror git@gitsrv:example.git