Prerequisite is to have SSH access into your Domain.
- Setup the Remote Shared Repo
scp -P yourSSHPort -r sharedProject.git yourUserName@yourDomain:/path/To/Repo
git init --bare
- Setup the Remote Server
ssh -p yourSSHPort yourUserName@yourDomain
Each user need to Generate a SSH Public Key and send you by email.
To append the ssh keys your receive from the Team’s members:
cat path/To/id_rsa.userName.pub >> ~/.ssh/authorized_keys
Or if the send you only the file content when you copy and paste inside the authorized_keys file you need to check that the Pasted content is all in One unique Line without returns.
- Limit Users Permissions
Modify the line containit “git:x:1000:1000…” as it look like:
This will limit User’s Power to Git Operations and Prevent the SSH Access to Shell.
Git Git, Git Tutorial, Git Getting-Started
After this Setup the Generic User can Begin to Develop on his Local Machine like:
git clone yourUserName@yourDomain:/path/To/Repo/sharedProject.git
After he make some Changes and want to Push to Remote Repo:
git commit -am 'description'
git push origin master