Re: How to identify the users?
- From
- Tomas Carnecky <tomas.carnecky@gmail.com>
- Date
- Jan 31, 2013, 06:08 UTC
- Message-ID
- <1359612481-ner-5936@calvin>
- In-Reply-To
- <CACkbei+Jby13B7rsEb3iLQM2ZSFDgrkgvrYC5M7u4yatppvLxA@mail.gmail.com>
On Thu, 31 Jan 2013 13:52:32 +0800, Scott Yan <scottyan19@gmail.com> wrote:
Show 18 quoted lines
> Hello everyone: > > The user info of git client (user name and email) is set by the users > themselves, so , how to avoid userA pretend to be userB? > > Git server could authentication the user, but it do nothing about the > user info of commit message. > > For example: > There are 20 people of my team, and everyone can push to the public > repository(git server), > If I found some backdoor code in my project, and the commit record > shows it was committed by userA, so I ask userA: why do you do this? > but he told me: no, this is not my code, I have never committed such > thing. ----and yes, everyone could change his user info to userA very > easily . > > so... what should I do to avoid such situations?
gitolite keeps a log of which SSH user pushed which commits. The smart-http backend does the same if you have reflog enabled on the server (see the ENVIRONMENT section in man git-http-backend). So unless someone can steal userA's credentials (http password, ssh key) you'll be able to detect who it really was.