I have a Raspberry pi 4 with Ubuntu Server 20.04 LTS installed. There, i have a Git repository hosting (precarious) for my personal projects, but i'm trying to use it for a team project. The Git directory are in an external drive, and the users do git pushing through ssh, by a Ubuntu user called git. I want to know how to do the ssh auth with the git user in /home/git/.ssh but that the user can only write on /home/git/repos (repos is a link to /media/hhd, an external hard disc). I want to do that to prevent the external users writing in the internal sdcard, but yes in the external drive.

I sorry for my English, i don't speak English but i'm using what i learned at school.


The best is to use some additional software that manage auth/access for you git repo.

gitolite https://gitolite.com/gitolite/index.html

gitosis https://github.com/tv42/gitosis , the projet is dead

Or if you want more , gitlab is opensource so you can install on your PI

  • Thank you for your response, i'll be reading about these projects. – Pablo Mederos May 18 '20 at 2:06

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.