They are using a password instead of a passkey and according to the documentation:
FtpPasskey
Path to the PPK passkey file, leave blank if using a Password
Yet I am receiving this error:
Attempting to use passkey instead of password 06:32:28 Error | Cannot bind argument to parameter ‘Path’ because it is null.
More details: The developer is deploying the package to one of their dev servers, and also running the Upload to Ftp step on that server, which has WinSCP installed. Running it locally on the server works with the same settings (username, password).
Has anyone run into this before with the Octopus step?
I took a look at the PowerShell code and the problem is here:
if ($FtpPasskey -ne "") {
Write-Host "Attempting to use passkey instead of password"
# Check key exists
if (!(Test-Path $FtpPasskey)) {
throw "Unable to locate passkey at: $FtpPasskey"
}
$sessionOptions.SshPrivateKeyPath = $FtpPasskey
# If the key requires a passphrase to access
if ($FtpPasskeyPhrase -ne "") {
$sessionOptions.PrivateKeyPassphrase = $FtpPasskeyPhrase
}
}
else {
$sessionOptions.Password = $FtpPassword
}
I did some debugging and see that leaving the parameter blank is indeed making that parameter $null. The if check is never working like it should because its hitting on “”, not $null.