简体   繁体   中英

Possible to have multiple git users logged in as root?

Is it possible to have multiple git users logged as the same Linux user?

What I would like is that multiple admins can login as root , make a git pull to a directory assigned to them, and then git push , but so we still can see who made which changes in the git log?

Each one of your users can clone the repo for his own. That repository would have his config.user and config.email according to the person using it, and they all pull and push to the same "central" repo.

Anyway, they are all root , so there's not much to do about preventing one of this admins to commit as another one. But if they aren't evil , you can do this.

gitosis can surely help to access control the repository, too, if needed.

Personally I would say that the correct mechanism to make sure that you can track changes in this sort of case would be not to have root as a permitted username for your repository. They would all have to commit with their individual user names by logging in as themselves.

In general nobody should be logged in as root other than very briefly while performing a specific task such as installing a new package - not all of the time while developing so anything you do to make such practices unrewarding is good.

It would be safer to manage that kind of access control with an authorization layer like gitolite , instead of relying on system account.

That way, you are controlling who can pull what.
Although that wouldn't control the "where" part (where the users would pull those repos to)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM