Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not create SSL/TLS secure channel in Start-FileDownloadInternal #3930

Closed
tbeu opened this issue Sep 5, 2024 · 8 comments
Closed

Could not create SSL/TLS secure channel in Start-FileDownloadInternal #3930

tbeu opened this issue Sep 5, 2024 · 8 comments

Comments

@tbeu
Copy link

tbeu commented Sep 5, 2024

I notice a

Start-FileDownloadInternal : Error downloading remote file: One or more errors occurred.
Inner Exception: The request was aborted: Could not create SSL/TLS secure channel.
At C:\Program Files\AppVeyor\BuildAgent\Modules\build-worker-api\build-worker-api.psm1:242 char:2
+     Start-FileDownloadInternal -Url $Url -FileName $FileName -Timeout ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Start-FileDownloadInternal], Exception
    + FullyQualifiedErrorId : System.Exception,Appveyor.BuildAgent.Api.Utils.StartFileDownloadInternalCmdlet

in https://ci.appveyor.com/project/tbeu/matio/build/job/u1gu5tbhab09jr85 Is there anything on my side to address this issue? Thanks!

@OwenMcDonnell
Copy link

Are you using Visual Studio 2015 image for this build? If so, there has been no changes to it for some time.
Can you try replacing the failing Start-FileDownload <url> with appveyor DownloadFile <url> command in your .appveyor.yml config file and see if it still fails?

tbeu added a commit to tbeu/matio that referenced this issue Sep 5, 2024
@tbeu
Copy link
Author

tbeu commented Sep 5, 2024

Same error on https://ci.appveyor.com/project/tbeu/matio/build/job/u1gu5tbhab09jr85

Error downloading remote file: One or more errors occurred.
Inner Exception: The request was aborted: Could not create SSL/TLS secure channel.

@OwenMcDonnell
Copy link

In that case try adding this line before the Start-FileDownload command.
- ps: "[Net.ServicePointManager]::SecurityProtocol = 'Tls12'"

tbeu added a commit to tbeu/matio that referenced this issue Sep 6, 2024
tbeu added a commit to tbeu/matio that referenced this issue Sep 6, 2024
tbeu added a commit to tbeu/matio that referenced this issue Sep 6, 2024
tbeu added a commit to tbeu/matio that referenced this issue Sep 6, 2024
@tbeu
Copy link
Author

tbeu commented Sep 6, 2024

Thanks for the hint of TLS downgrade. No matter what I tried, I failed in https://ci.appveyor.com/project/tbeu/matio/history

@OwenMcDonnell
Copy link

It looks like TLS 1.2 is not so straightforward to enable on Windows Server 2012.
I think using curl as an alternative should work.
- curl -fsS -o hdf5-1.8.13-win32-VS2010-shared.zip https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.13/bin/windows/hdf5-1.8.13-win32-VS2010-shared.zip

tbeu added a commit to tbeu/matio that referenced this issue Sep 7, 2024
@tbeu
Copy link
Author

tbeu commented Sep 7, 2024

No success

Invoke-WebRequest : A parameter cannot be found that matches parameter name 'fsS'.
At line:19 char:10
+     curl -fsS -o hdf5-1.8.13-win32-VS2010-shared.zip https://support. ...
+          ~~~~
    + CategoryInfo          : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

@OwenMcDonnell
Copy link

Looks like curl called within a powershell script is aliased to Invoke-WebRequest. Try this instead...

$args = '-fsS', '-o', 'hdf5-1.8.13-win32-VS2010-shared.zip',
                'https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.13/bin/windows/hdf5-1.8.13-win32-VS2010-shared.zip'
$curlexe = 'C:\Tools\curl\bin\curl.exe'
& $curlexe @args

tbeu added a commit to tbeu/matio that referenced this issue Sep 9, 2024
tbeu added a commit to tbeu/matio that referenced this issue Sep 9, 2024
tbeu added a commit to tbeu/matio that referenced this issue Sep 9, 2024
tbeu added a commit to tbeu/matio that referenced this issue Sep 9, 2024
tbeu added a commit to tbeu/matio that referenced this issue Sep 9, 2024
tbeu added a commit to tbeu/matio that referenced this issue Sep 9, 2024
tbeu added a commit to tbeu/matio that referenced this issue Sep 9, 2024
tbeu added a commit to tbeu/matio that referenced this issue Sep 9, 2024
tbeu added a commit to tbeu/matio that referenced this issue Sep 9, 2024
@tbeu
Copy link
Author

tbeu commented Sep 9, 2024

Thanks for the support. I gave up on external download, but added the external files in a dedicated git repository. Both git submodule or direct git clone work as expected (via HTTPS).

@tbeu tbeu closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants