How to get a pusher Information in post-processing?

The author, Committer, and Pusher may be different people in Git, but git did not store pusher information in logs.

So how do I get it?

+6
source share
2 answers

You do not know. upstream repo makes no assumptions about who provides the commit: it can be via email, the diff patch copied to the USB key, and others a href = "http://git-scm.com/book/en/Git -Internals-Transfer-Protocols "rel =" nofollow noreferrer "> various transfer protocols .

Some of these protocols (ssh, https) may have in their logs the information you are looking for, but:

  • it has nothing to do with git
  • Suppose their log level is set appropriately.
  • even for Gitolite , the ssh key public name registered in the gitolite-admin registry can be anything you want and is not associated with a real name.

As Linus mentions (in Why do some open source projects not accept download requests, but only patch files for email? "):

since github ids are random, I expect the transfer request to be a signed tag so that I can verify the person in question.

So, if you want someone to push some commits to vouch for the integrity of the entire repo, you can make and sign the tag on HEAD what is being pushed so that the repository is upstream you are like, not exactly a โ€œpusherโ€, but one who checks what was clicked

+7
source

If the push is through SSH, you can use the USER environment variable. (Of course, this will also work for local taps.) It depends, of course, on whether the user used to log in to SSH differs for different users of your system - for example, this does not apply to gitol. (However, the hitolite will define the GL_USER environment GL_USER to identify the pusher.) For HTTP, you can try the REMOTE_USER environment REMOTE_USER .

Update. In general, this information is not very interesting compared to the author and commit commit - it always seems to me a surprise, for example, that GitHub displays a user who made specific clicks on everyone ...

+5
source

Source: https://habr.com/ru/post/919420/


All Articles