All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] connect.c: Tell *PLink to always use ssh protocol
@ 2013-02-06 21:58 Sven Strickroth
  2013-02-06 23:22 ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Strickroth @ 2013-02-06 21:58 UTC (permalink / raw)
  To: git; +Cc: gitster, Jeff King

Default values for *plink can be set using PuTTY. If a user makes
telnet the default in PuTTY this breaks ssh clones in git.

Since git clones of the type user@host:path use ssh, tell *plink
to use ssh and override PuTTY defaults for the protocol to use.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
---
 connect.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/connect.c b/connect.c
index 49e56ba..d337b6f 100644
--- a/connect.c
+++ b/connect.c
@@ -625,6 +625,8 @@ struct child_process *git_connect(int fd[2], const char *url_orig,
 		if (!ssh) ssh = "ssh";
 
 		*arg++ = ssh;
+		if (putty)
+			*arg++ = "-ssh";
 		if (putty && !strcasestr(ssh, "tortoiseplink"))
 			*arg++ = "-batch";
 		if (port) {
-- 
Best regards,
 Sven Strickroth
 PGP key id F5A9D4C4 @ any key-server

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

* Re: [PATCH] connect.c: Tell *PLink to always use ssh protocol
  2013-02-06 21:58 [PATCH] connect.c: Tell *PLink to always use ssh protocol Sven Strickroth
@ 2013-02-06 23:22 ` Jeff King
  2013-02-07  9:40   ` Sven Strickroth
  2013-03-09 14:08   ` Sven Strickroth
  0 siblings, 2 replies; 4+ messages in thread
From: Jeff King @ 2013-02-06 23:22 UTC (permalink / raw)
  To: Sven Strickroth; +Cc: msysgit, git, gitster

On Wed, Feb 06, 2013 at 10:58:49PM +0100, Sven Strickroth wrote:

> Default values for *plink can be set using PuTTY. If a user makes
> telnet the default in PuTTY this breaks ssh clones in git.
> 
> Since git clones of the type user@host:path use ssh, tell *plink
> to use ssh and override PuTTY defaults for the protocol to use.
> 
> Signed-off-by: Sven Strickroth <email@cs-ware.de>

Makes sense to me, though I'd expect to see this cc'd to the msysgit
list (which I'm doing on this response) for comment from people who
might be more familiar with the area.

Quoted patch follows.

-Peff

> ---
>  connect.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/connect.c b/connect.c
> index 49e56ba..d337b6f 100644
> --- a/connect.c
> +++ b/connect.c
> @@ -625,6 +625,8 @@ struct child_process *git_connect(int fd[2], const char *url_orig,
>  		if (!ssh) ssh = "ssh";
>  
>  		*arg++ = ssh;
> +		if (putty)
> +			*arg++ = "-ssh";
>  		if (putty && !strcasestr(ssh, "tortoiseplink"))
>  			*arg++ = "-batch";
>  		if (port) {
> -- 
> Best regards,
>  Sven Strickroth
>  PGP key id F5A9D4C4 @ any key-server

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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

* Re: [PATCH] connect.c: Tell *PLink to always use ssh protocol
  2013-02-06 23:22 ` Jeff King
@ 2013-02-07  9:40   ` Sven Strickroth
  2013-03-09 14:08   ` Sven Strickroth
  1 sibling, 0 replies; 4+ messages in thread
From: Sven Strickroth @ 2013-02-07  9:40 UTC (permalink / raw)
  To: Jeff King; +Cc: msysgit, git, gitster

Am 07.02.2013 00:22 schrieb Jeff King:
> On Wed, Feb 06, 2013 at 10:58:49PM +0100, Sven Strickroth wrote:
> 
>> Default values for *plink can be set using PuTTY. If a user makes
>> telnet the default in PuTTY this breaks ssh clones in git.
>>
>> Since git clones of the type user@host:path use ssh, tell *plink
>> to use ssh and override PuTTY defaults for the protocol to use.
>> ---
>>  connect.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/connect.c b/connect.c
>> index 49e56ba..d337b6f 100644
>> --- a/connect.c
>> +++ b/connect.c
>> @@ -625,6 +625,8 @@ struct child_process *git_connect(int fd[2], const char *url_orig,
>>  		if (!ssh) ssh = "ssh";
>>  
>>  		*arg++ = ssh;
>> +		if (putty)
>> +			*arg++ = "-ssh";
>>  		if (putty && !strcasestr(ssh, "tortoiseplink"))
>>  			*arg++ = "-batch";
>>  		if (port) {

Just for the completeness: This might have an unwanted side effect...
Using the -ssh parameter sets the protocol to ssh AND the port number to
22. This might break a setting where a user stores a PuTTY default for
ssh, but with a different port number (e.g. because a user always pushes
to a remote ssh repository which resides on a different port).

PuTTY settings for a named session still work, it only affects the
"Default Settings" session - so users can set up specific sessons in
PuTTY if he wants to change the default port.

-- 
Best regards,
 Sven Strickroth
 PGP key id F5A9D4C4 @ any key-server

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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

* Re: [PATCH] connect.c: Tell *PLink to always use ssh protocol
  2013-02-06 23:22 ` Jeff King
  2013-02-07  9:40   ` Sven Strickroth
@ 2013-03-09 14:08   ` Sven Strickroth
  1 sibling, 0 replies; 4+ messages in thread
From: Sven Strickroth @ 2013-03-09 14:08 UTC (permalink / raw)
  To: Jeff King; +Cc: msysgit, git, gitster

Am 07.02.2013 00:22 schrieb Jeff King:
> On Wed, Feb 06, 2013 at 10:58:49PM +0100, Sven Strickroth wrote:
> 
>> Default values for *plink can be set using PuTTY. If a user makes
>> telnet the default in PuTTY this breaks ssh clones in git.
>>
>> Since git clones of the type user@host:path use ssh, tell *plink
>> to use ssh and override PuTTY defaults for the protocol to use.
>>
>> Signed-off-by: Sven Strickroth <email@cs-ware.de>
> 
> Makes sense to me, though I'd expect to see this cc'd to the msysgit
> list (which I'm doing on this response) for comment from people who
> might be more familiar with the area.

The msysgit people have a git-wrapper which already enables this (see
https://github.com/msysgit/msysgit/blob/master/src/git-wrapper/git-wrapper.c#L62).

-- 
Best regards,
 Sven Strickroth
 PGP key id F5A9D4C4 @ any key-server

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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

end of thread, other threads:[~2013-03-09 14:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06 21:58 [PATCH] connect.c: Tell *PLink to always use ssh protocol Sven Strickroth
2013-02-06 23:22 ` Jeff King
2013-02-07  9:40   ` Sven Strickroth
2013-03-09 14:08   ` Sven Strickroth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.