git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How to identify the users?

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Jan 31, 2013, 06:10 UTC
Message-ID
<510A0ACF.5060501@gmail.com>
In-Reply-To
<1359612481-ner-5936@calvin>
On 01/31/2013 11:38 AM, Tomas Carnecky wrote:
Show 25 quoted lines
> On Thu, 31 Jan 2013 13:52:32 +0800, Scott Yan <scottyan19@gmail.com> wrote:
>> 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.
See also my rant on this topic:
https://github.com/sitaramc/gitolite/blob/master/src/VREF/EMAIL-CHECK#L37
Previous: Tomas CarneckyNext: Scott Yan
Message 3 of 7 in “How to identify the users?”
  1. Scott YanJan 31, 2013
  2. Tomas CarneckyJan 31, 2013
  3. Sitaram ChamartyJan 31, 2013
  4. Scott YanJan 31, 2013
  5. Sitaram ChamartyJan 31, 2013
  6. Andrew ArdillJan 31, 2013
  7. Scott YanJan 31, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.