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.