* Who created a branch - reflog
@ 2011-03-08 14:38 Miklos Vajna
2011-03-08 14:57 ` Shawn Pearce
0 siblings, 1 reply; 3+ messages in thread
From: Miklos Vajna @ 2011-03-08 14:38 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 653 bytes --]
Hi,
We have a repo where multiple users have push access, they access the
repo via ssh. Now let's say one of the developers ("A") accidently create a
branch named "foo" in the shared repo. Of course the tip of "foo" may
not point to a commit authored by "A".
IIRC reflogs could be used in that case when the push is done via http,
as the HTTP username is recorded in the reflog, so we can know who to
blame.
Unfortunately - as far as I see - this is not true for ssh, there simply
the author of the tip commit is used.
Have I missed something? Would it be possible to have the username of
the user in the reflog, even when pushing via ssh?
Thanks.
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Who created a branch - reflog
2011-03-08 14:38 Who created a branch - reflog Miklos Vajna
@ 2011-03-08 14:57 ` Shawn Pearce
2011-03-08 15:11 ` Miklos Vajna
0 siblings, 1 reply; 3+ messages in thread
From: Shawn Pearce @ 2011-03-08 14:57 UTC (permalink / raw)
To: Miklos Vajna; +Cc: git
On Tue, Mar 8, 2011 at 06:38, Miklos Vajna <vmiklos@frugalware.org> wrote:
> We have a repo where multiple users have push access, they access the
> repo via ssh. Now let's say one of the developers ("A") accidently create a
> branch named "foo" in the shared repo. Of course the tip of "foo" may
> not point to a commit authored by "A".
>
> IIRC reflogs could be used in that case when the push is done via http,
> as the HTTP username is recorded in the reflog, so we can know who to
> blame.
>
> Unfortunately - as far as I see - this is not true for ssh, there simply
> the author of the tip commit is used.
>
> Have I missed something? Would it be possible to have the username of
> the user in the reflog, even when pushing via ssh?
reflog identity entries are derived from GIT_COMMITTER_NAME and
GIT_COMMITTER_EMAIL in the environment at the time that the log event
takes place. If these aren't set, they are derived from the current
user's gecos, or from $GIT_DIR/config or ~/.gitconfig as the
user.name/user.email variables.
Perhaps over SSH one of these is triggering for a user, allowing the
user to fill in their own identity... or someone else's. If you want
to enforce an identity you should set these environment variables on
the SSH server side before invoking git-receive-pack, perhaps by way
of a forced SSH command the way gitosis or gitolite is installed.
--
Shawn.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Who created a branch - reflog
2011-03-08 14:57 ` Shawn Pearce
@ 2011-03-08 15:11 ` Miklos Vajna
0 siblings, 0 replies; 3+ messages in thread
From: Miklos Vajna @ 2011-03-08 15:11 UTC (permalink / raw)
To: Shawn Pearce; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 938 bytes --]
On Tue, Mar 08, 2011 at 06:57:38AM -0800, Shawn Pearce <spearce@spearce.org> wrote:
> reflog identity entries are derived from GIT_COMMITTER_NAME and
> GIT_COMMITTER_EMAIL in the environment at the time that the log event
> takes place. If these aren't set, they are derived from the current
> user's gecos, or from $GIT_DIR/config or ~/.gitconfig as the
> user.name/user.email variables.
>
> Perhaps over SSH one of these is triggering for a user, allowing the
> user to fill in their own identity... or someone else's. If you want
> to enforce an identity you should set these environment variables on
> the SSH server side before invoking git-receive-pack, perhaps by way
> of a forced SSH command the way gitosis or gitolite is installed.
Then once I'm sure the users can't alter their identity on the server,
the same can be achieved using ssh as with http.
Great, that's exactly what I was needed. :)
Thanks!
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-08 15:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-08 14:38 Who created a branch - reflog Miklos Vajna
2011-03-08 14:57 ` Shawn Pearce
2011-03-08 15:11 ` Miklos Vajna
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 NNTP newsgroup(s).