-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
As seen in the comments on npm/cli#3233 and #7, trying to install a git repository with the current npm CLI fails
when using OpenSSH <7.6 with the following:
npm ERR! command git --no-replace-objects ls-remote ssh://git@gitserver.com/foo/bar.git
npm ERR! command-line line 0: unsupported option "accept-new".
npm ERR! fatal: Could not read from remote repository.
While the change is in theory a good one (I was caught off guard with the old behavior when cloning a repository failed due to a missing host key), it creates issues in practice.
- OpenSSH >= 7.6 probably can't be expected - at the very least in my case, on an up-to-date Amazon Linux, I'm stuck with 7.4p1 from the repositories, and I'd rather not compile from source.
- This implementation overrides .git/config and ~/.gitconfig, contrary to the PR (and ~/.ssh/config as well, as someone pointed out)
Proposals I've seen include:
- Verifying the current ssh version (
ssh -V
) before attempting to use accept-new - Wholesale reversion of fix: default to accepting new ssh host key fingerprints #7
adamlounds, zacthompson, iethree, kornelski, jamesholcomb and 8 morepuka-tchou and ben-lau
Metadata
Metadata
Assignees
Labels
No labels