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

Re: [ANNOUNCE] Git v2.16.0-rc0

From
Bryan Turner <bturner@atlassian.com>
Date
Jan 3, 2018, 03:34 UTC
Message-ID
<CAGyf7-FQp4q2vvH1ponQvmVDTu0hiMSK1JKytQZ4O1i0MCnz7g@mail.gmail.com>
In-Reply-To
<xmqqfu7ui2af.fsf@gitster.mtv.corp.google.com>
On Thu, Dec 28, 2017 at 8:30 PM, Junio C Hamano <gitster@pobox.com> wrote:
> An early preview release Git v2.16.0-rc0 is now available for
> testing at the usual places.  It is comprised of 435 non-merge
> commits since v2.15.0, contributed by 76 people, 22 of which are
> new faces.
> Brandon Williams (24):
>       ssh: introduce a 'simple' ssh variant
Show 11 quoted lines
> Jonathan Nieder (10):
>       ssh test: make copy_ssh_wrapper_as clean up after itself
>       connect: move no_fork fallback to git_tcp_connect
>       connect: split git:// setup into a separate function
>       connect: split ssh command line options into separate function
>       connect: split ssh option computation to its own function
>       ssh: 'auto' variant to select between 'ssh' and 'simple'
>       ssh: 'simple' variant does not support -4/-6
>       ssh: 'simple' variant does not support --port
>       connect: correct style of C-style comment
>       generate-cmdlist: avoid non-deterministic output

Sorry for being late to the party on the "simple" variant for SSH, but we've been doing some testing with 2.16.0-rc0 and noticed an unexpected issue.

Our test environment is still on Ubuntu 12.04 LTS (it's a long story, but one I doubt is unique to us), which means it's using OpenSSH 5.9. ssh -G was added in OpenSSH 6.8 [1], circa March 2015, which means the "auto" detection "fails" and chooses "simple" instead of "ssh". But OpenSSH 5.9 _does_ support -4, -6 and -p. As a result, commands which have been working without issue on all previous versions of Git start to fail saying:

git -c gc.auto=0 -c credential.helper= fetch --force --prune --progress ssh://localhost:64281/repo.git +refs/*:refs/*' exited with code 128 saying: fatal: ssh variant 'simple' does not support setting port

I know Ubuntu 12.04 LTS is end-of-life, but 14.04 LTS, which is running OpenSSH 6.6 [2], has the same issue. The following is from a fully patched 14.04.5:

bturner@ubuntu:~$ cat /etc/*ease | head -4 DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"

bturner@ubuntu:~$ ssh -V OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8, OpenSSL 1.0.1f 6 Jan 2014

bturner@ubuntu:~$ ssh -G -p 7999 localhost
unknown option -- G
usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
           [-D [bind_address:]port] [-E log_file] [-e escape_char]
           [-F configfile] [-I pkcs11] [-i identity_file]
           [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec]
           [-O ctl_cmd] [-o option] [-p port]
           [-Q cipher | cipher-auth | mac | kex | key]
           [-R [bind_address:]port:host:hostport] [-S ctl_path] [-W host:port]
           [-w local_tun[:remote_tun]] [user@]hostname [command]

Is it possible to adjust the check, somehow, so it doesn't impact older OpenSSH versions like this? As it stands, it seems likely a fair number of users who have an SSH command that does support -4, -6 and -p are going to end up getting "penalized" because it doesn't also support -G, and have to manually set their SSH variant to "ssh" (or something other than "auto") to avoid the automatic detection.

I'd love to say I have a brilliant idea for how to work around this, oh and here's a patch, but I don't. One option might be trying to actually review the output, and another might be to run "ssh -V", but both of those have their own flaws (and the extra process forks aren't "free").

[1] https://www.openssh.com/txt/release-6.8 [2] https://launchpad.net/ubuntu/+source/openssh

Best regards, Bryan Turner

Previous: Paul SmithNext: Jonathan Nieder
Message 6 of 20 in “[ANNOUNCE] Git v2.16.0-rc0”
  1. Junio C HamanoDec 29, 2017
  2. Kaartic SivaraamDec 29, 2017
  3. Paul SmithDec 29, 2017
  4. Thomas GummererJan 4, 2018
  5. Paul SmithJan 4, 2018
  6. Bryan TurnerJan 3, 2018
  7. Jonathan NiederJan 3, 2018
  8. Bryan TurnerJan 3, 2018
  9. Jonathan NiederJan 3, 2018
  10. Junio C HamanoJan 3, 2018
  11. Jonathan NiederJan 3, 2018
  12. Jeff KingJun 8, 2018
  13. Junio C HamanoJun 12, 2018
  14. Jeff KingJun 14, 2018
  15. Jonathan NiederJun 14, 2018
  16. Jeff KingJun 14, 2018
  17. Jonathan NiederJun 15, 2018
  18. Jeff KingJun 15, 2018
  19. Jeff KingJun 15, 2018
  20. Johannes SchindelinJan 4, 2018

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.