git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Sitaram Chamarty <sitaramc@gmail.com>
To: git@vger.kernel.org
Cc: tv@eagain.net
Subject: gitosis question: identifying/logging remote user
Date: Tue, 2 Jun 2009 09:32:40 +0530	[thread overview]
Message-ID: <2e24e5b90906012102y4e1e6281p437e4d88da517c08@mail.gmail.com> (raw)

Hi,

Summary:

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".

Detail:

gitosis uses lines in ~git/.ssh/authorized_keys that use ssh's
"command=" feature.  Specifically, the command is restricted to
"gitosis-serve username".  Internally, gitosis uses this name to
decide if you're allowed to do what you're trying to do.

I'd like it to set an additional env var which will contain "username"
so that hooks etc can get that info and use it as they they see fit.

Q1: are there any downsides to doing this?  I don't see any, you're
just creating and setting a new variable but...

Q2: if it's a good idea, can someone give me a hint about where to do
this?  I'm useless at python but I'm willing to try.

Thanks,

Sitaram

             reply	other threads:[~2009-06-02  4:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-02  4:02 Sitaram Chamarty [this message]
2009-06-02  6:31 ` gitosis question: identifying/logging remote user Robin H. Johnson
2009-06-02 13:19   ` Sitaram Chamarty
2009-06-02 20:21     ` Robin H. Johnson
2009-06-03  0:54       ` Sitaram Chamarty
2009-06-02 13:56 ` [PATCH] Add USER environment variable to executed git commands when serving Heiko Voigt
2009-06-03  1:04   ` Sitaram Chamarty
2009-06-03  6:24     ` Sitaram Chamarty
2009-06-03 20:27       ` Heiko Voigt
2009-06-03 20:50         ` Robin H. Johnson
2009-06-03 21:02           ` Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2e24e5b90906012102y4e1e6281p437e4d88da517c08@mail.gmail.com \
    --to=sitaramc@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=tv@eagain.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).