There's no such thing as an account with or without login permissions. Normally you need a git account. And that means you can log in to it. And then you have to try and configure your ssh server so you can only run the git server (I forget the command) once you've logged into it. You can use ForceCommand to make it so you can only run the git server, but if a mistake is made with this configuration then you can log in or port forward or X forward or file transfer as git.
This is a terrible idea because it's blacklist-based security. Places like GitHub have their own ssh server that only runs the git server and nothing else.