Add my git user

I log in as root:

adduser-N -d /path/to/my/repository/repo -s /bin/bash -r MyGitUser

-N do not create a group with the same name as the user
-d home directory of the new account
-s login shell of the new account
-r create a system account

what’s happen in /etc/passwd
MyGitUser:x:888:100:/path/to/my/repository/repo:/bin/bash

passwd MyGitUser

ok back again.

Now i’m able todo something like
git clone MyGitUser@myhost:project.git
or more complicated
git clone MyGitUser@myhost:/path/to/my/repository/repo/project.git

cheers

Leave a Reply

Your email address will not be published. Required fields are marked *