threads / discuss / 35657

Error logging for git over ssh?

Subject: Error logging for git over ssh?

## tl;dr

3 messages between Jan 14, 2014 and Jan 15, 2014.

replies: 2people: 2as markdown or json

Martin Langhoff· Jan 14, 2014, 18:44 UTC · lore

Diagnosing errors with git over ssh has historically required tooling up for debugging or looking at things from the client side, because git does not log anything on the server side.

It would be a boon to those running busy git servers to be able to diagnose by looking at a log. It can be both old-fashioned, or very modern (if you are using journald).

After digging around the mailing list, current git master and "what's cooking", I fail to see anything. Is there a built-in way in modern git to direct stderr on the server side to a logger or to a file? (I see git-daemon has some support, but it does not handle git ssh connections...)

Some common "use cases" I've had to debug the hard way:
 - a ref is not up to date and the server rejects non-FF pushes
 - perms issues over objects or refs
 - ENOSPC
 - refs have a stale .lock file
cheers,
m
-- 
 martin.langhoff@gmail.com
 -  ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 ~ http://docs.moodle.org/en/User:Martin_Langhoff
Duy Nguyen· Jan 15, 2014, 01:51 UTC · re: Martin Langhoff · lore

Re: Error logging for git over ssh?

On Wed, Jan 15, 2014 at 1:44 AM, Martin Langhoff <martin.langhoff@gmail.com> wrote:

Show 7 quoted lines
> Diagnosing errors with git over ssh has historically required tooling
> up for debugging or looking at things from the client side, because
> git does not log anything on the server side.
>
> It would be a boon to those running busy git servers to be able to
> diagnose by looking at a log. It can be both old-fashioned, or very
> modern (if you are using journald).

Maybe we could put a "pager" program in front of stderr and let it does the logging? We'll need to output the error side bands to stderr too in case side-band is used.

-- 
Duy
Martin Langhoff· Jan 15, 2014, 04:40 UTC · re: Duy Nguyen · lore

Re: Error logging for git over ssh?

On Tue, Jan 14, 2014 at 8:51 PM, Duy Nguyen <pclouds@gmail.com> wrote:
> We'll need to output the error side bands to stderr
> too in case side-band is used.
Agreed, we'd need to "tee" the output so it gets to the logger _and_ to stderr.

I thought perhaps daemon.c would have something in this spirit, but the trivial implementation is not what I had expected...

cheers,
m
-- 
 martin.langhoff@gmail.com
 -  ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 ~ http://docs.moodle.org/en/User:Martin_Langhoff

← back to recent threads