I have setup a git server, by creating a user "git" and then creating a local repository in the git user's directory.
The git server works great, I can pull, push, etc. I allowed users to interact with the git repo by adding their public keys to to the
.ssh/authorized_keys
file. I have disabled password based logins. But the problem is that these users can login to the server via ssh since their keys are on the authorized keys list. Okay, the permissions are set to be pretty restricted for the git user, but still, I would prefer it if there was no way for git to login directly.
Is there a way to disable logins for the "git" user, but maintain the ability for the git user to accept pushes and pull through git/ssh?