{"thread":{"id":"32846","subject":"[PATCH] connect.c: Tell *PLink to always use ssh protocol","startedAt":"2013-02-06T21:58:49Z","lastAt":"2013-03-09T14:08:30Z","messageCount":4,"participants":["Sven Strickroth","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"208869","messageId":"5112D219.3020604@tu-clausthal.de","threadId":"32846","inReplyTo":null,"subject":"[PATCH] connect.c: Tell *PLink to always use ssh protocol","fromName":"Sven Strickroth","fromEmail":"sven.strickroth@tu-clausthal.de","sentAt":"2013-02-06T21:58:49Z","receivedAt":"2013-02-06T21:58:49Z","isPatch":true,"sender":{"key":"sven.strickroth@tu-clausthal.de","avatar":null},"body":"Default values for *plink can be set using PuTTY. If a user makes\ntelnet the default in PuTTY this breaks ssh clones in git.\n\nSince git clones of the type user@host:path use ssh, tell *plink\nto use ssh and override PuTTY defaults for the protocol to use.\n\nSigned-off-by: Sven Strickroth <email@cs-ware.de>\n---\n connect.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/connect.c b/connect.c\nindex 49e56ba..d337b6f 100644\n--- a/connect.c\n+++ b/connect.c\n@@ -625,6 +625,8 @@ struct child_process *git_connect(int fd[2], const char *url_orig,\n \t\tif (!ssh) ssh = \"ssh\";\n \n \t\t*arg++ = ssh;\n+\t\tif (putty)\n+\t\t\t*arg++ = \"-ssh\";\n \t\tif (putty && !strcasestr(ssh, \"tortoiseplink\"))\n \t\t\t*arg++ = \"-batch\";\n \t\tif (port) {\n-- \nBest regards,\n Sven Strickroth\n PGP key id F5A9D4C4 @ any key-server\n"},{"id":"208886","messageId":"20130206232214.GN27507@sigill.intra.peff.net","threadId":"32846","inReplyTo":"5112D219.3020604@tu-clausthal.de","subject":"Re: [PATCH] connect.c: Tell *PLink to always use ssh protocol","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-02-06T23:22:14Z","receivedAt":"2013-02-06T23:22:14Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Feb 06, 2013 at 10:58:49PM +0100, Sven Strickroth wrote:\n\n> Default values for *plink can be set using PuTTY. If a user makes\n> telnet the default in PuTTY this breaks ssh clones in git.\n> \n> Since git clones of the type user@host:path use ssh, tell *plink\n> to use ssh and override PuTTY defaults for the protocol to use.\n> \n> Signed-off-by: Sven Strickroth <email@cs-ware.de>\n\nMakes sense to me, though I'd expect to see this cc'd to the msysgit\nlist (which I'm doing on this response) for comment from people who\nmight be more familiar with the area.\n\nQuoted patch follows.\n\n-Peff\n\n> ---\n>  connect.c | 2 ++\n>  1 file changed, 2 insertions(+)\n> \n> diff --git a/connect.c b/connect.c\n> index 49e56ba..d337b6f 100644\n> --- a/connect.c\n> +++ b/connect.c\n> @@ -625,6 +625,8 @@ struct child_process *git_connect(int fd[2], const char *url_orig,\n>  \t\tif (!ssh) ssh = \"ssh\";\n>  \n>  \t\t*arg++ = ssh;\n> +\t\tif (putty)\n> +\t\t\t*arg++ = \"-ssh\";\n>  \t\tif (putty && !strcasestr(ssh, \"tortoiseplink\"))\n>  \t\t\t*arg++ = \"-batch\";\n>  \t\tif (port) {\n> -- \n> Best regards,\n>  Sven Strickroth\n>  PGP key id F5A9D4C4 @ any key-server\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/groups/opt_out.\n"},{"id":"208907","messageId":"511376A9.6030803@tu-clausthal.de","threadId":"32846","inReplyTo":"20130206232214.GN27507@sigill.intra.peff.net","subject":"Re: [PATCH] connect.c: Tell *PLink to always use ssh protocol","fromName":"Sven Strickroth","fromEmail":"sven.strickroth@tu-clausthal.de","sentAt":"2013-02-07T09:40:57Z","receivedAt":"2013-02-07T09:40:57Z","isPatch":true,"sender":{"key":"sven.strickroth@tu-clausthal.de","avatar":null},"body":"Am 07.02.2013 00:22 schrieb Jeff King:\n> On Wed, Feb 06, 2013 at 10:58:49PM +0100, Sven Strickroth wrote:\n> \n>> Default values for *plink can be set using PuTTY. If a user makes\n>> telnet the default in PuTTY this breaks ssh clones in git.\n>>\n>> Since git clones of the type user@host:path use ssh, tell *plink\n>> to use ssh and override PuTTY defaults for the protocol to use.\n>> ---\n>>  connect.c | 2 ++\n>>  1 file changed, 2 insertions(+)\n>>\n>> diff --git a/connect.c b/connect.c\n>> index 49e56ba..d337b6f 100644\n>> --- a/connect.c\n>> +++ b/connect.c\n>> @@ -625,6 +625,8 @@ struct child_process *git_connect(int fd[2], const char *url_orig,\n>>  \t\tif (!ssh) ssh = \"ssh\";\n>>  \n>>  \t\t*arg++ = ssh;\n>> +\t\tif (putty)\n>> +\t\t\t*arg++ = \"-ssh\";\n>>  \t\tif (putty && !strcasestr(ssh, \"tortoiseplink\"))\n>>  \t\t\t*arg++ = \"-batch\";\n>>  \t\tif (port) {\n\nJust for the completeness: This might have an unwanted side effect...\nUsing the -ssh parameter sets the protocol to ssh AND the port number to\n22. This might break a setting where a user stores a PuTTY default for\nssh, but with a different port number (e.g. because a user always pushes\nto a remote ssh repository which resides on a different port).\n\nPuTTY settings for a named session still work, it only affects the\n\"Default Settings\" session - so users can set up specific sessons in\nPuTTY if he wants to change the default port.\n\n-- \nBest regards,\n Sven Strickroth\n PGP key id F5A9D4C4 @ any key-server\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/groups/opt_out.\n"},{"id":"210896","messageId":"513B425E.1020208@tu-clausthal.de","threadId":"32846","inReplyTo":"20130206232214.GN27507@sigill.intra.peff.net","subject":"Re: [PATCH] connect.c: Tell *PLink to always use ssh protocol","fromName":"Sven Strickroth","fromEmail":"sven.strickroth@tu-clausthal.de","sentAt":"2013-03-09T14:08:30Z","receivedAt":"2013-03-09T14:08:30Z","isPatch":true,"sender":{"key":"sven.strickroth@tu-clausthal.de","avatar":null},"body":"Am 07.02.2013 00:22 schrieb Jeff King:\n> On Wed, Feb 06, 2013 at 10:58:49PM +0100, Sven Strickroth wrote:\n> \n>> Default values for *plink can be set using PuTTY. If a user makes\n>> telnet the default in PuTTY this breaks ssh clones in git.\n>>\n>> Since git clones of the type user@host:path use ssh, tell *plink\n>> to use ssh and override PuTTY defaults for the protocol to use.\n>>\n>> Signed-off-by: Sven Strickroth <email@cs-ware.de>\n> \n> Makes sense to me, though I'd expect to see this cc'd to the msysgit\n> list (which I'm doing on this response) for comment from people who\n> might be more familiar with the area.\n\nThe msysgit people have a git-wrapper which already enables this (see\nhttps://github.com/msysgit/msysgit/blob/master/src/git-wrapper/git-wrapper.c#L62).\n\n-- \nBest regards,\n Sven Strickroth\n PGP key id F5A9D4C4 @ any key-server\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/groups/opt_out.\n"}]}