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

Re: [PATCH] Ensure that SSH runs in non-interactive mode

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 20, 2008, 22:17 UTC
Message-ID
<alpine.DEB.1.00.0807210012480.3305@eeepc-johanness>
In-Reply-To
<7vhcak5o6n.fsf@gitster.siamese.dyndns.org>
Hi,
On Sun, 20 Jul 2008, Junio C Hamano wrote:
Show 26 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > How about this instead?
> >
> > -- snipsnap --
> > diff --git a/connect.c b/connect.c
> > index 574f42f..7e7f4d3 100644
> > --- a/connect.c
> > +++ b/connect.c
> > @@ -603,7 +603,8 @@ struct child_process *git_connect(int fd[2], const char *url
> >  
> >  		*arg++ = ssh;
> >  		if (port) {
> > -			*arg++ = "-p";
> > +			const char *opt = getenv("GIT_SSH_PORT_OPTION");
> > +			*arg++ = opt ? opt : "-p";
> >  			*arg++ = port;
> >  		}
> >  		*arg++ = host;
> 
> If you only care only about the ones we currently want to support, I do
> not htink it makes any difference either way, but if we are shooting for
> having a minimum-but-reasonable framework to make it easy to support other
> ones that we haven't seen, it feels very much like an inadequate hack to
> waste an envirnoment variable for such a narrow special case.  With this,
> what you really mean is "Plink uses -P instead of -p", right?

Yeah. My first attempt was to allow "GIT_SSH='plink.exe -P %p %h'" to work, and for that matter, "git config --global transport.ssh 'plink.exe -P %p %h'", but I decided that it would be easier to do the patch I posted.

Anyway, I think that this issue wasted enough of my time, as I will never use plink anyway. As long as the patch does not have an adverse effect on my use case, which happens to be the default case, I will just not bother anymore, even if I think that GIT_SSH=wrapper would be better than special case rarely exercized ssh programs in the source code.

Ciao, Dscho

Previous: Junio C HamanoNext: Steffen Prohaska
Message 12 of 16 in “Ensure that SSH runs in non-interactive mode”
  1. Ensure that SSH runs in non-interactive modeFredrik Tolf, Jul 19, 2008
  2. Mike HommeyJul 19, 2008
  3. Keith PackardJul 19, 2008
  4. Fredrik TolfJul 19, 2008
  5. Johannes SchindelinJul 20, 2008
  6. Fredrik TolfJul 20, 2008
  7. Johannes SchindelinJul 20, 2008
  8. Fredrik TolfJul 20, 2008
  9. Junio C HamanoJul 20, 2008
  10. Johannes SchindelinJul 20, 2008
  11. Junio C HamanoJul 20, 2008
  12. Johannes SchindelinJul 20, 2008
  13. Steffen ProhaskaJul 21, 2008
  14. Jeff KingJul 21, 2008
  15. Mike HommeyJul 21, 2008
  16. Jeff KingJul 21, 2008

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.