git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-daemon and hook output
@ 2008-10-24  5:07 Joey Hess
  2008-10-24 20:39 ` Miklos Vajna
  0 siblings, 1 reply; 3+ messages in thread
From: Joey Hess @ 2008-10-24  5:07 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 852 bytes --]

According to githooks, standard output/error for the post-receive and
pre-receive hooks will be seen by the user. This is true if using ssh.
But if git-daemon has been configured to allow pushes, the user will
not see anything these hooks output, and only a not very helpful

 ! [remote rejected] master -> master (pre-receive hook declined)

I suppose that to fix this, git-daemon would have to select on stdout
and stderr and pipe them over the wire to the client. Apologies for not
even trying to write a patch to do that.

(I ran into this in a real-world application -- I'm implementing
anonymous pushes into ikiwiki, which are checked pre-receive to limit
them to changes that could be done via the web interface. So all my nice
error messages about why a commit is refused are not available, which is
a pity.)

-- 
see shy jo

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git-daemon and hook output
  2008-10-24  5:07 git-daemon and hook output Joey Hess
@ 2008-10-24 20:39 ` Miklos Vajna
  2008-10-24 20:42   ` Shawn O. Pearce
  0 siblings, 1 reply; 3+ messages in thread
From: Miklos Vajna @ 2008-10-24 20:39 UTC (permalink / raw)
  To: Joey Hess; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 692 bytes --]

On Fri, Oct 24, 2008 at 01:07:13AM -0400, Joey Hess <joey@kitenet.net> wrote:
> I ran into this in a real-world application -- I'm implementing
> anonymous pushes into ikiwiki, which are checked pre-receive to limit
> them to changes that could be done via the web interface. So all my nice
> error messages about why a commit is refused are not available, which is
> a pity.

I think the recommended protocol even for anonymous push is ssh, at
least that's what repo.or.cz uses for the 'mob' user, which is
equivalent to anonymous, AFAIK.

(The source is available under repo.git, I did not have a look how one
can set up an account - using git-shell - that can be used without a
password.)

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git-daemon and hook output
  2008-10-24 20:39 ` Miklos Vajna
@ 2008-10-24 20:42   ` Shawn O. Pearce
  0 siblings, 0 replies; 3+ messages in thread
From: Shawn O. Pearce @ 2008-10-24 20:42 UTC (permalink / raw)
  To: Miklos Vajna; +Cc: Joey Hess, git

Miklos Vajna <vmiklos@frugalware.org> wrote:
> On Fri, Oct 24, 2008 at 01:07:13AM -0400, Joey Hess <joey@kitenet.net> wrote:
> > I ran into this in a real-world application -- I'm implementing
> > anonymous pushes into ikiwiki, which are checked pre-receive to limit
> > them to changes that could be done via the web interface. So all my nice
> > error messages about why a commit is refused are not available, which is
> > a pity.
> 
> I think the recommended protocol even for anonymous push is ssh, at
> least that's what repo.or.cz uses for the 'mob' user, which is
> equivalent to anonymous, AFAIK.

Nah.  git:// supports anonymous push.  For some applications its
just what people want.  I say the original change is worthwhile;
expose the remote address and let a hook do logging and/or denials
based on its own logic.

-- 
Shawn.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-24 20:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-24  5:07 git-daemon and hook output Joey Hess
2008-10-24 20:39 ` Miklos Vajna
2008-10-24 20:42   ` Shawn O. Pearce

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