Ssh problem with SDK

Hi,

After adding my phone as a device and succesfully testing the connection debugging fails with an ssh problem:

22:14:14: Running steps for project donnie...
22:14:14: Start Build Engine: The "Sailfish OS Build Engine" virtual machine is already running. Nothing to do.
22:14:14: Starting: "C:\SailfishOS\settings\SailfishSDK\libsfdk\build-target-tools\Sailfish OS Build Engine\SailfishOS-3.4.0.24-armv7hl\qmake.cmd" C:\temp\sailfish\apps\donnie\donnie.pro -spec linux-g++ "CONFIG+=debug" "CONFIG+=qml_debug"
+ C:/SailfishOS/bin/./sfdk.exe -c target=SailfishOS-3.4.0.24-armv7hl qmake 'C:\temp\sailfish\apps\donnie\donnie.pro' -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
Not running under MSYS shell. Session management is not possible.
Error connecting to the build engine: Cannot establish SSH connection: ssh binary "" does not exist.
Error running command on the build engine: 
22:14:14: The process "C:\SailfishOS\settings\SailfishSDK\libsfdk\build-target-tools\Sailfish OS Build Engine\SailfishOS-3.4.0.24-armv7hl\qmake.cmd" exited with code 120.
Error while building/deploying project donnie (kit: SailfishOS-3.4.0.24-armv7hl (in Sailfish OS Build Engine))
When executing step "qmake"
22:14:14: Elapsed time: 00:01.

I am using Windows 10. ssh.exe is not in the PATH

Setting:
Path to ssh executable: C:\Program Files\Git\usr\bin\ssh.exe

Testing connection:

Connecting to host...
Checking kernel version...
Linux 3.4.67-sfos+ armv7l

Checking if specified ports are available...
All specified ports are available.

Checking whether an SFTP connection can be set up...
SFTP service available.

Checking whether rsync works...
Failed to start rsync: Process failed to start: The system cannot find the file specified.

SFTP will be used for deployment, because rsync is not available.

Device test finished successfully.

And about rsync:

Using username "defaultuser".
defaultuser@192.168.4.26's password:
Last login: Tue Dec  1 20:50:53 2020 from 192.168.4.155
,---
| Sailfish OS 3.4.0.24 (Pallas-Yllästunturi)
'---
[defaultuser@One ~]$ rsync --version
rsync  version 3.1.3  protocol version 31
Copyright (C) 1996-2018 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, symtimes, prealloc

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.
[defaultuser@One ~]$

Looks like I managed to get things running by creating a batch file ssh.bat somewhere in the PATH containing:

"C:\Program Files\Git\usr\bin\ssh.exe" %*

Glad you got it working but why not just add C:\Program Files\Git\usr\bin to PATH?

Well I have so much tools and stuff and they come and go quit fast. If I add them all to PATH it will become a real mess.

Since the IDE allows to specify which ssh to use I think it should always use that setting. (And not only for contacting the build VM)

Instead of setting path to ssh executable, try to add C:\Program Files\Git\usr\bin under IDE Options > Version Control > Git > Prepend to PATH.

I’d highly discourage you from using the ssh.bar wrapper - it does not work as well as one would assume. It is not possible to achieve perfect argument forwarding with Windows CMD.

Anyway, the best and easiest option is to let the Git installer update your PATH, which is the default option IIRC. Should you want to uninstall it later, it will revert the change.

Thanks. I did not know that existed but I guess that only works for git, not for setting up a connection with my device since I still get this:

Error connecting to the build engine: Cannot establish SSH connection: ssh binary "" does not exist.

It should really help it locate your ssh. Looking at the code again I think you need to restart the IDE after setting it. Check this https://github.com/sailfishos/sailfish-qtcreator/blob/master/src/plugins/projectexplorer/projectexplorer.cpp#L2011

I did restart the IDE but it not help.
Looking at the code you pointed me to what is thi supposed to contain?

const QString gitBinary = Core::ICore::settings()->value("Git/BinaryPath", "git").toString();

My QCreator.ini contains this section:

[Git]
DiffPatience=true
Path=" C:\\Program Files\\Git\\usr\\bin"
Username=
SpaceIgnorantBlame=true
LogDiff=false
FollowRenames=true
ShowTags=false
LogCount=100
RepositoryBrowserCmd=
OmitAnnotationDate=false
PromptOnSubmit=true
PullRebase=false
RefLogShowDate=false
UserEmail=
LastResetIndex=0
WinSetHomeEnvironment=true
BinaryPath=git
SpaceIgnorantDiff=true
GitKOptions=
GraphLog=false
FirstParent=false
BlameDetectMove=0
Timeout=60

There is a BinaryPath in the Subversion section though containing svn.exe

Git/BinaryPath is the binary (or better executable) path, which may be relative (like the default git), in which case it look under system PATH and Git/Path for it.

Doesn’t the space in Path=" C:\\Program... break it?