With Microsoft now providing an official implementation of OpenSSH for Windows, there's only a few things that are required from the Phabricator upstream to support this functionality, all of which relate to the commands that are invoked by "Lease Working Copy". Right now you can get 90% of the way there with:
- Installing the OpenSSH package: https://chocolatey.org/packages/win32-openssh (with SSH key authentication feature)
- Adding an authorized_keys file.
- Configuring Drydock as normal.
At this point, Phabricator will successfully connect and authenticate with the machine.
Outstanding Issues
Clone Command
If you're running "Lease Working Copy", it will attempt to run:
git clone '...' '/var/drydock/...'
This is wrong in the Windows world for two reasons; single quotes aren't supported, and the local path should be anchored with C:/.
The former can be addressed once D15675 is landed, and the latter can be addressed once Drydock supports customizable working paths.
Execute Command
If you're running "Run Drydock Command", it will attempt to do something like:
(cd /var/drydock/... && command)
Parenthesis aren't supported in Windows, and it's not exactly clear why they're necessary in this scenario. As far as I'm aware; omitting the parenthesis would be fine on all platforms.
The other issue is that for Windows && needs to become & as the command joining operator is different. The && operator works fine as long as the command is being executed in the context of cmd. For SSH on Windows, this means the command execution has to become cmd /C "cd c:/var/drydock/... && command".