I have a remote linux machine with only one user.
I just set up git repos on it without a git
user. But all the tutorials suggest me to use the git
user. So right now I am using
git clone user@hostname:/path/to/git/directory/your_project.git
rather than :
git clone git@hostname:/path/to/git/directory/your_project.git
And it works fine.
If I use the git account, for each project I have to change permission for that project and change the config to share the directory.
Does using the setting up and using a git user have any advantage over using your user account on linux?
Not much, maybe convention - git automation tools and APIs might expect a git user, but I've never come across such a situation.
Sources: https://git-scm.com/book/en/v1/Git-on-the-Server-The-Protocols and https://www.digitalocean.com/community/tutorials/how-to-set-up-a-private-git-server-on-a-vps
The second one describes the creation of a
git
user, and then you get the URLs (over SSH, using a SCP-like syntax, as referenced in the first article's second method) to begit@server:
.You've essentially done the same thing but with whatever user instead of a user named
git
, so you getuser@server: