在mobaxterm下运行个 docker-machine ls 虽然出结果,但是紧接着就报错:
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default * virtualbox Running Unknown ssh command error:
command : ip addr show
err : fork/exec G:\Mxt108\slash\bin\ssh.exe: This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.
以前也被mobaxterm对git的兼容性由于curl不同版本,还有awk不同版本搞出来的各种问题烦的头疼。
今天搜了下上面ssh的错误,发现很多人在cygwin这类环境下使用docker-machine都会报错。有的说是因为bash下的ssh被先使用了,覆盖了docker自己想使用的go语言实现的版本,所以出问题。强制ssh顺序后可解决。
于是export PATH=/f/DockerToolbox:$PATH再去运行docker-machine ls,问题依旧。
再次 cygu "C:\Program Files\Git\usr\bin" 然后export PATH="/c/Program Files/Git/usr/bin":/f/DockerToolbox:$PATH,现在运行docker-machine ls,没有问题了。
原来c盘的git是docker toolbox安装的哦。他要使用这个里面的ssh。
参见 : https://github.com/kubernetes/minikube/issues/263
类似的话:
well, if i override the PATH in current session with "set PATH=c:" so it doesn't find the OpenSSH binary, minikube works :) .
I think it's worth fixing this issue, should be a really small
adjustment - to avoid using any other external ssh command even if it
exists in PATH.