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

Re: gitosis question: identifying/logging remote user

From
Robin H. Johnson <robbat2@gentoo.org>
Date
Jun 2, 2009, 06:31 UTC
Message-ID
<robbat2-20090602T062332-128740789Z@orbis-terrarum.net>
In-Reply-To
<2e24e5b90906012102y4e1e6281p437e4d88da517c08@mail.gmail.com>
On Tue, Jun 02, 2009 at 09:32:40AM +0530, Sitaram Chamarty wrote:
> I want to be able to log the information that the post-receive hook
> receives, but I *also* want, along with that, the name of the pubkey
> that was used in this particular "push".
I've got a partial patch that I never finished for using this with the
gitosis-gentoo fork that powers git.overlays.gentoo.org. It needs
re-implementation from scratch, but here's the design notes:
1. Use the username to open the file in keydir again.
2. At the top, look for RFC822 headers with a leading "# " as padding:
   Examples from my own patch:
   # Full-Name: "Robin H. Johnson (robbat2)" <robbat2@gentoo.org>
   # cia-vc-username: robbat2
   The headers are followed by a blank line then further text is free-form
   and not parsed. Continuation lines are NOT supported.
3. The header field names are transformed to enviornoment variable names
   as follows:
   - y/[[:lower:]]/[[:upper:]]/g
   - s/-/_/g
4. Export the environment variables, named per above, with the full
   content of the rest of the line.
(We need to export the CIA.vc data, and also send off a commit mail).
-- 
Robin Hugh Johnson
Gentoo Linux Developer & Infra Guy
E-Mail     : robbat2@gentoo.org
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85
Previous: Sitaram ChamartyNext: Sitaram Chamarty
Message 2 of 11 in “gitosis question: identifying/logging remote user”
  1. Sitaram ChamartyJun 2, 2009
  2. Robin H. JohnsonJun 2, 2009
  3. Sitaram ChamartyJun 2, 2009
  4. Robin H. JohnsonJun 2, 2009
  5. Sitaram ChamartyJun 3, 2009
  6. Add USER environment variable to executed git commands when servingHeiko Voigt, Jun 2, 2009
  7. Sitaram ChamartyJun 3, 2009
  8. Sitaram ChamartyJun 3, 2009
  9. Heiko VoigtJun 3, 2009
  10. Robin H. JohnsonJun 3, 2009
  11. Shawn O. PearceJun 3, 2009

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.