2

I am running a git server on archlinux. Now I want to give a certain user access to a repository. So I created a user and set its home folder to the repository directory. Now i can checkout the repository using ssh. But the user can also ssh to the server now and see other files. How can i restrict ssh access for that user but allow him to use the repository using ssh? I tried setting the shell to /sbin/nologin but then cloning doesn't work.

1

use git-shell as the shell in /etc/passwd

http://schacon.github.com/git/git-shell.html

0

If you're using a new enough version of SSH (and you should), this is now a built-in feature. Here's an article on how to set it up.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.