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

Re: git-gui Error

From
MKMartin Koegler <mkoegler@auto.tuwien.ac.at>
Date
Feb 14, 2007, 18:09 UTC
Message-ID
<20070214180906.GB21612@auto.tuwien.ac.at>
In-Reply-To
<20070214022200.GB30884@spearce.org>
On Tue, Feb 13, 2007 at 09:22:00PM -0500, Shawn O. Pearce wrote:
Show 25 quoted lines
> Martin Koegler <mkoegler@auto.tuwien.ac.at> wrote:
> > My fault, I had only a too old GIT core (1.4.1) in my path.
> > With the current version, the problem disapears.
> 
> Yea, I figured (much later) it was something like that.  I still
> think there is a bug in git-gui, namely not telling you that it
> requires Git 1.5.x or later if it finds out the 'git' its invoking
> is older than that.  I'll probably patch it tonight, but it won't
> ship that way in 1.5.0.
>  
> > Some notes about using git-gui: 
> > 
> > * Fetching over ssh results in an empty dialog. The password prompt is
> > only shown in the terminal window, which is likly to be hidden by the
> > the main window of git-gui.
> 
> This is a "feature".  I only use git-gui + ssh with an ssh-agent
> and public key authentication, so I never get password prompts.
> Unfortunately Tcl does not permit me to setup bi-directional pipes
> to a process (heck, I can't get both stdout and stderr except by
> going through cat!), and even if it does, I think ssh would demand
> the tty to get the password, thereby bypassing my pipe anyway.
> 
> Basically I don't know how to improve this.  If someone has a bright
> idea, please pass it along!
Well, there are two way:
1) SSH_ASKPASS (see ssh(1))
    If ssh needs a passphrase, it will read the passphrase from the
    current terminal if it was run from a terminal.  If ssh does not
    have a terminal associated with it but DISPLAY and SSH_ASKPASS
    are set, it will execute the program specified by SSH_ASKPASS
    and open an X11 window to read the passphrase.  This is particu-
    larly useful when calling ssh from a .Xsession or related
    script.  (Note that on some machines it may be necessary to
    redirect the input from /dev/null to make this work.)

This require, that a password helper is installed. One implementation is part of every linux distribution (openssh-askpass-gnome).

2) Simulate user (like http://websvn.kde.org/tags/KDE/3.4.3/kdebase/kioslave/fish/fish.cpp?rev=467549&view=auto)

This requires opening a pty and running ssh on the slave of it. Additionally it requires some logic to determine, what type of input ssh requires.

I tried to implement the second way in a C program once. The interpretion of the ssh output is difficult, but I got it working, but after a system upgrade, the logic was not working any more. So I would avoid this.

mfg Martin Kögler
Previous: Shawn O. PearceNext: Shawn O. Pearce
Message 10 of 11 in “git-gui Error”
  1. Martin KoeglerFeb 13, 2007
  2. Shawn O. PearceFeb 13, 2007
  3. Martin KoeglerFeb 13, 2007
  4. Shawn O. PearceFeb 14, 2007
  5. Shawn O. PearceFeb 14, 2007
  6. Martin KoeglerFeb 14, 2007
  7. Shawn O. PearceFeb 15, 2007
  8. Martin KoeglerFeb 15, 2007
  9. Shawn O. PearceFeb 15, 2007
  10. Martin KoeglerFeb 14, 2007
  11. Shawn O. PearceFeb 15, 2007

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.