Deploying to custom NuGet feed using TLS 1.2 requires a workaround

david.pollock's Avatar

david.pollock

15 Aug, 2017 04:54 PM

Hi,

I am attempting to publish to a custom NuGet feed which only accepts connections using TLS 1.2. I get the following error:

Publishing <package>.nupkg to https://<my custom feed>...An error occurred while sending the request. The underlying connection was closed: An unexpected error occurred on a send.

I was able to work around this issue by adding this to force TLS 1.2:

before_deploy:
    - ps: '[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12'

Is there a better way to solve this problem? If not, you may want to consider adding automatic support for TLS 1.2.

Thanks,
David

  1. 1 Posted by Ilya Finkelshte... on 15 Aug, 2017 10:57 PM

    Ilya Finkelshteyn's Avatar

    Hi David,

    This is right way to solve the problem.
    I believe we could do this with registry settings found here and here, but this will probably break a lot of communication with servers which do not support TLS 1.2. So for now we recommend people to do exactly what you did :)

    Ilya.

  2. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:19 AM.

Comments are currently closed for this discussion. You can start a new one.

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