Try to deploy (SFTP) to Sourceforge: Error - Cannot connect SFTP server: Failed to negotiate key exchange algorithm.
Hi,
Whenever, I try to "deploy" using SFTP to Sourceforge
I am getting back the following error:
`Cannot connect SFTP server: Failed to negotiate key exchange algorithm.`
I have already checked:
1. Password and its "encryped YAML password" in appveyor.yml
2. Manually SFTP a small simple text file manually using my password.
My manual SFTP transfer from my home computer to Sourceforge works..
Here is my most recent failure:
https://ci.appveyor.com/project/AndreMikulec/appveyortest4/builds/45364945#L17
and its appveyor.yml file
https://github.com/AndreMikulec/appveyortest4/blob/35fb8c5c65e896473889b7a446c0a6dfaa15a940/appveyor.yml#L29
```
deploy:
- provider: FTP
host: frs.sourceforge.net
protocol: sftp
# https://sourceforge.net/projects/andremikulec/files/
username: andremikulec,andremikulec.u
password:
secure: AZOInJ/FinCYx+tbyshJR5VWUISswlz5yiGDqfgEXLg=
artifact: ALPHA
folder: /home/frs/project/andremikulec
application:
active_mode: false
debug: true
```
With the same "deploy" structure(account, password, host, target folder),
here is a successful deployment from two(2) months ago:
`R 4.2.1 - tests: EARLY SEP 2022 build jobs`
https://ci.appveyor.com/project/AndreMikulec/r-base/builds/44724663/job/jsx682x3whu9v729#L24375
and its appveyor.yml file
https://github.com/AndreMikulec/r-base/blob/2e0da96cda5b817c450c678507a20731512e181e/appveyor.yml#L83
```
- provider: FTP
host: frs.sourceforge.net
protocol: sftp
# https://sourceforge.net/projects/andremikulec/files/
username: andremikulec,andremikulec.u
password:
secure: AZOInJ/FinCYx+tbyshJR5VWUISswlz5yiGDqfgEXLg=
artifact: "%APPVEYOR_PROJECT_SLUG%_%appveyor_build_version%_%version%_%DEPLOYNAME%.7z"
folder: /home/frs/project/andremikulec
application:
active_mode: false
```
Please help.
Thanks,
Andre
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 14 Nov, 2022 12:25 AM
Hi Andre,
Checking the logs I see that both successful and failed builds have been running on
Visual Studio 2015
image and in the same build environment.Visual Studio 2015
image wasn't changed for the last 3 months. Build Agent was not updated during that period as well.However, that https://ci.appveyor.com/project/AndreMikulec/appveyortest4 project is running on
Visual Studio 2019
image and gives the same error which is strange.I suspect something changed on SF side (like an update exchange algorithm?) which is not yet supported by a SFTP library used in AppVeyor Build Agent.
You can try using WinSCP for deployment to SF.
The general algorithm for using WinSCP in a build script:
where FTP_USER and FTP_PSW are secure environment variables defined on either project settings UI or in appveyor.yml.
Let me know if that worked.
2 Posted by andre_mikulec on 15 Nov, 2022 02:07 AM
Feodor Fitsner,
Short answer: the situation may be? . . .
"The server's host key was not found in the cache."
Long answer:
In this particular case, this SFTP host is on Sourceforge.
In this help request, everything is public knowledge EXCEPT my password %FTP_PSW%.
Sourceforge docs that I followed.
https://sourceforge.net/p/forge/documentation/SFTP/
MY_PASSWORD is not "my password".
I stored my real password in the web interface Appveyor environment variable FTP_PSW.
Here are results . .
I tried locally using ftpes:
local sftpes output:
Following "open command"
https://winscp.net/eng/docs/scriptcommand_open
I tried locally using sftp:
local sftp output:
I tried online using ftpes:
https://github.com/AndreMikulec/appveyortest4/blob/b8a108d9a3005235...
online ftpes output:
https://ci.appveyor.com/project/AndreMikulec/appveyortest4/builds/4...
I tried online using sftp:
https://github.com/AndreMikulec/appveyortest4/blob/2515b789a12e9726...
online sftp output:
https://ci.appveyor.com/project/AndreMikulec/appveyortest4/builds/4...
I followed this:
https://winscp.net/eng/docs/scriptcommand_open
I tried online using sftp:
https://github.com/AndreMikulec/appveyortest4/blob/40c7d4b7388e6985...
online sftp output:
https://ci.appveyor.com/project/AndreMikulec/appveyortest4/builds/4...
What happens next?
Thanks,
Andre
Support Staff 3 Posted by Feodor Fitsner on 15 Nov, 2022 04:16 AM
Hi Andre,
Thanks for your time investigating this! That knowledge will definitely help other AppVeyor users having the same issues/requirements!
If it works with WinSCP then use it going forward.
I will try looking if that could be implemented with .NET FTP library used in AppVeyor Build Agent, but honestly we have never been able to find a decent .NET FTP client with OS license.
4 Posted by andre_mikulec on 15 Nov, 2022 08:48 PM
If it works with WinSCP then use it going forward.
O.K. Thanks