由于 SSL 问题,Azure DevOps 部署代理无法连接

Stu*_*urf 6 azure-devops azure-agent

由于 SSL 问题,Azure 部署代理几天后不再工作。

我有几台服务器无法再连接到 Azure DevOps。

我发现以下博客应该启用tls 1.2。

https://devblogs.microsoft.com/visualstudio/azure-devops-requires-tls-1-2-on-all-connections-include-visual-studio/

我检查了我们是否启用了正确的安全协议。

C:\azagent\A2> [System.Net.ServicePointManager]::SecurityProtocol
Ssl3, Tls, Tls12
Run Code Online (Sandbox Code Playgroud)

我还按照以下步骤确保在 Windows 寄存器中启用了 TLS。我手动添加了这些值,因为有些值不存在。

Path                                                                                          Name                        Value
----                                                                                          ----                        -----
HKLM:\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319                                 SystemDefaultTlsVersions    1
HKLM:\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319                                 SchUseStrongCrypto          1
HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319                                             SystemDefaultTlsVersions    1
HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319                                             SchUseStrongCrypto          1
HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server    Enabled                     1
HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server    DisabledByDefault           0
HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client    Enabled                     1
HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client    DisabledByDefault           0
Run Code Online (Sandbox Code Playgroud)

我在下面发布了日志,因为我不知道发生了什么。还有其他人有什么想法吗?

日志:

[2022-02-05 18:38:37Z INFO AgentProcess] Agent package win-x64.
[2022-02-05 18:38:37Z INFO AgentProcess] Running on Windows (X64).
[2022-02-05 18:38:37Z INFO AgentProcess] RuntimeInformation: Microsoft Windows 6.3.9600.
[2022-02-05 18:38:37Z INFO AgentProcess] Version: 2.198.2
[2022-02-05 18:38:37Z INFO AgentProcess] Commit: d1b85881abfe7b5e575af095daf0ee27e099b904
[2022-02-05 18:38:37Z INFO AgentProcess] Culture: nl-NL
[2022-02-05 18:38:37Z INFO AgentProcess] UI Culture: en-US
[2022-02-05 18:38:37Z INFO HostContext] Well known directory 'Bin': 'C:\azagent\A2\bin'
[2022-02-05 18:38:37Z INFO HostContext] Well known directory 'Root': 'C:\azagent\A2'
[2022-02-05 18:38:37Z INFO AgentProcess] Validating directory permissions for: 'C:\azagent\A2'
[2022-02-05 18:38:37Z INFO PowerShellExeUtil] Generation: '1'
[2022-02-05 18:38:37Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine', value name 'PowerShellVersion': '2.0'
[2022-02-05 18:38:37Z INFO PowerShellExeUtil] Unsupported version. Skipping.
[2022-02-05 18:38:37Z INFO PowerShellExeUtil] Generation: '3'
[2022-02-05 18:38:37Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine', value name 'PowerShellVersion': '4.0'
[2022-02-05 18:38:37Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine', value name 'ApplicationBase': 'C:\Windows\System32\WindowsPowerShell\v1.0'
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework', value name 'InstallRoot': 'C:\Windows\Microsoft.NET\Framework64\'
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'SOFTWARE\Microsoft\NET Framework Setup\NDP' contains sub keys:
[2022-02-05 18:38:37Z INFO AgentProcess]  'CDF'
[2022-02-05 18:38:37Z INFO AgentProcess]  'v2.0.50727'
[2022-02-05 18:38:37Z INFO AgentProcess]  'v3.0'
[2022-02-05 18:38:37Z INFO AgentProcess]  'v3.5'
[2022-02-05 18:38:37Z INFO AgentProcess]  'v4'
[2022-02-05 18:38:37Z INFO AgentProcess]  'v4.0'
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727', value name 'Version': '2.0.50727.4927'
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727', value name 'Install': '1'
[2022-02-05 18:38:37Z INFO AgentProcess] Testing directory: 'C:\Windows\Microsoft.NET\Framework64\v2.0.50727'
[2022-02-05 18:38:37Z INFO AgentProcess] Found version: 2.0.50727
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0', value name 'Version': '3.0.30729.4926'
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0', value name 'Install': '1'
[2022-02-05 18:38:37Z INFO AgentProcess] Testing directory: 'C:\Windows\Microsoft.NET\Framework64\v3.0'
[2022-02-05 18:38:37Z INFO AgentProcess] Found version: 3.0
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5', value name 'Version': '3.5.30729.4926'
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5', value name 'Install': '1'
[2022-02-05 18:38:37Z INFO AgentProcess] Testing directory: 'C:\Windows\Microsoft.NET\Framework64\v3.5'
[2022-02-05 18:38:37Z INFO AgentProcess] Found version: 3.5
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4', value name 'Version' is null.
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4', value name '' is null.
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4' contains sub keys:
[2022-02-05 18:38:37Z INFO AgentProcess]  'Client'
[2022-02-05 18:38:37Z INFO AgentProcess]  'Full'
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'Version': '4.8.03761'
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'Install': '1'
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'InstallPath': 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\'
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'Release': '528049'
[2022-02-05 18:38:37Z INFO AgentProcess] Type is System.Int32
[2022-02-05 18:38:37Z INFO AgentProcess] Interpreted version: 4.7.0
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'Version': '4.8.03761'
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'Install': '1'
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'InstallPath': 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\'
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'Release': '528049'
[2022-02-05 18:38:37Z INFO AgentProcess] Type is System.Int32
[2022-02-05 18:38:37Z INFO AgentProcess] Interpreted version: 4.7.0
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4.0', value name 'Version' is null.
[2022-02-05 18:38:37Z INFO AgentProcess] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4.0', value name '': 'deprecated'
[2022-02-05 18:38:37Z INFO AgentProcess] Found 5 versions:
[2022-02-05 18:38:37Z INFO AgentProcess]  2.0.50727
[2022-02-05 18:38:37Z INFO AgentProcess]  3.0
[2022-02-05 18:38:37Z INFO AgentProcess]  3.5
[2022-02-05 18:38:37Z INFO AgentProcess]  4.7.0
[2022-02-05 18:38:37Z INFO AgentProcess]  4.7.0
[2022-02-05 18:38:37Z INFO AgentProcess] Testing for min NET Framework version: '4.5'
[2022-02-05 18:38:37Z INFO HostContext] Well known directory 'Bin': 'C:\azagent\A2\bin'
[2022-02-05 18:38:37Z INFO HostContext] Well known directory 'Root': 'C:\azagent\A2'
[2022-02-05 18:38:38Z INFO CommandSettings] Configure {
  "AcceptTeeEula": false,
  "AddDeploymentGroupTags": false,
  "AddEnvironmentVirtualMachineResourceTags": false,
  "AddMachineGroupTags": false,
  "AlwaysExtractTask": false,
  "Agent": "IIS18",
  "CollectionName": null,
  "DeploymentGroup": false,
  "DeploymentGroupName": null,
  "DeploymentGroupTags": null,
  "DeploymentPool": false,
  "DeploymentPoolName": null,
  "EnvironmentVMResource": true,
  "EnvironmentName": "Logic4-Next - Production",
  "EnvironmentVMResourceTags": null,
  "GitUseSChannel": false,
  "DisableLogUploads": false,
  "MachineGroup": false,
  "MachineGroupName": null,
  "MachineGroupTags": null,
  "MonitorSocketAddress": null,
  "NotificationPipeName": null,
  "NotificationSocketAddress": null,
  "NoRestart": false,
  "OverwriteAutoLogon": false,
  "Pool": null,
  "ProjectName": "Logic4Desktop",
  "ProxyPassword": null,
  "ProxyUserName": null,
  "ProxyUrl": null,
  "Replace": false,
  "RunAsAutoLogon": false,
  "RunAsService": true,
  "RunOnce": false,
  "PreventServiceStart": false,
  "SslCACert": null,
  "SslClientCert": null,
  "SslClientCertArchive": null,
  "SslClientCertKey": null,
  "SslClientCertPassword": null,
  "SslSkipCertValidation": false,
  "Url": "https://dev.azure.com/organization/",
  "WindowsLogonAccount": null,
  "WindowsLogonPassword": null,
  "Work": "_work",
  "Auth": "PAT",
  "LaunchBrowser": false,
  "Password": null,
  "Token": "***",
  "Unattended": false,
  "UserName": null,
  "Help": false,
  "Version": false
}
[2022-02-05 18:38:38Z INFO AgentProcess] Arguments parsed
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Bin': 'C:\azagent\A2\bin'
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Root': 'C:\azagent\A2'
[2022-02-05 18:38:38Z INFO HostContext] Well known config file 'Proxy': 'C:\azagent\A2\.proxy'
[2022-02-05 18:38:38Z INFO VstsAgentWebProxy] No proxy setting found.
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Bin': 'C:\azagent\A2\bin'
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Root': 'C:\azagent\A2'
[2022-02-05 18:38:38Z INFO HostContext] Well known config file 'Certificates': 'C:\azagent\A2\.certificates'
[2022-02-05 18:38:38Z INFO AgentCertificateManager] No certificate setting found.
[2022-02-05 18:38:38Z INFO Agent] ExecuteCommand
[2022-02-05 18:38:38Z INFO ConfigurationStore] currentAssemblyLocation: C:\azagent\A2\bin\Agent.Listener.dll
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Bin': 'C:\azagent\A2\bin'
[2022-02-05 18:38:38Z INFO ConfigurationStore] binPath: C:\azagent\A2\bin
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Bin': 'C:\azagent\A2\bin'
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Root': 'C:\azagent\A2'
[2022-02-05 18:38:38Z INFO ConfigurationStore] RootFolder: C:\azagent\A2
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Bin': 'C:\azagent\A2\bin'
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Root': 'C:\azagent\A2'
[2022-02-05 18:38:38Z INFO HostContext] Well known config file 'Agent': 'C:\azagent\A2\.agent'
[2022-02-05 18:38:38Z INFO ConfigurationStore] ConfigFilePath: C:\azagent\A2\.agent
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Bin': 'C:\azagent\A2\bin'
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Root': 'C:\azagent\A2'
[2022-02-05 18:38:38Z INFO HostContext] Well known config file 'Credentials': 'C:\azagent\A2\.credentials'
[2022-02-05 18:38:38Z INFO ConfigurationStore] CredFilePath: C:\azagent\A2\.credentials
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Bin': 'C:\azagent\A2\bin'
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Root': 'C:\azagent\A2'
[2022-02-05 18:38:38Z INFO HostContext] Well known config file 'Service': 'C:\azagent\A2\.service'
[2022-02-05 18:38:38Z INFO ConfigurationStore] ServiceConfigFilePath: C:\azagent\A2\.service
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Bin': 'C:\azagent\A2\bin'
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Root': 'C:\azagent\A2'
[2022-02-05 18:38:38Z INFO HostContext] Well known config file 'Autologon': 'C:\azagent\A2\.autologon'
[2022-02-05 18:38:38Z INFO ConfigurationStore] AutoLogonSettingsFilePath: C:\azagent\A2\.autologon
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Bin': 'C:\azagent\A2\bin'
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Root': 'C:\azagent\A2'
[2022-02-05 18:38:38Z INFO HostContext] Well known config file 'Options': 'C:\azagent\A2\.options'
[2022-02-05 18:38:38Z INFO ConfigurationStore] RuntimeOptionsFilePath: C:\azagent\A2\.options
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Bin': 'C:\azagent\A2\bin'
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Root': 'C:\azagent\A2'
[2022-02-05 18:38:38Z INFO HostContext] Well known config file 'SetupInfo': 'C:\azagent\A2\.setup_info'
[2022-02-05 18:38:38Z INFO ConfigurationStore] SetupInfoFilePath: C:\azagent\A2\.setup_info
[2022-02-05 18:38:38Z INFO Terminal] WRITE LINE: 
  ___                      ______ _            _ _
 / _ \                     | ___ (_)          | (_)
/ /_\ \_____   _ _ __ ___  | |_/ /_ _ __   ___| |_ _ __   ___  ___
|  _  |_  / | | | '__/ _ \ |  __/| | '_ \ / _ \ | | '_ \ / _ \/ __|
| | | |/ /| |_| | | |  __/ | |   | | |_) |  __/ | | | | |  __/\__ \
\_| |_/___|\__,_|_|  \___| \_|   |_| .__/ \___|_|_|_| |_|\___||___/
                                   | |
        agent v2.198.2             |_|          (commit d1b8588)

[2022-02-05 18:38:38Z INFO ConfigurationManager] CheckAgentRootDirectorySecure
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Bin': 'C:\azagent\A2\bin'
[2022-02-05 18:38:38Z INFO HostContext] Well known directory 'Root': 'C:\azagent\A2'
[2022-02-05 18:38:38Z INFO ConfigurationManager] ConfigureAsync
[2022-02-05 18:38:38Z INFO ConfigurationStore] IsConfigured()
[2022-02-05 18:38:38Z INFO ConfigurationStore] IsConfigured: False
[2022-02-05 18:38:38Z INFO ConfigurationManager] Is configured: False
[2022-02-05 18:38:38Z INFO CommandSettings] Flag 'sslskipcertvalidation': 'False'
[2022-02-05 18:38:38Z INFO ConfigurationManager] Testing for min NET Framework version: '4.6'
[2022-02-05 18:38:38Z INFO CommandSettings] Flag 'deploymentgroup': 'False'
[2022-02-05 18:38:38Z INFO CommandSettings] Flag 'deploymentpool': 'False'
[2022-02-05 18:38:38Z INFO CommandSettings] Flag 'environment': 'True'
[2022-02-05 18:38:38Z INFO ExtensionManager] Getting extensions for interface: 'Microsoft.VisualStudio.Services.Agent.Listener.Configuration.IConfigurationProvider'
[2022-02-05 18:38:38Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.BuildReleasesAgentConfigProvider, Agent.Listener
[2022-02-05 18:38:38Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.DeploymentGroupAgentConfigProvider, Agent.Listener
[2022-02-05 18:38:38Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.SharedDeploymentAgentConfigProvider, Agent.Listener
[2022-02-05 18:38:38Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.EnvironmentVMResourceConfigProvider, Agent.Listener
[2022-02-05 18:38:38Z INFO Terminal] WRITE LINE: 
[2022-02-05 18:38:38Z INFO Terminal] WRITE LINE: >> Connect:
[2022-02-05 18:38:38Z INFO Terminal] WRITE LINE: 
[2022-02-05 18:38:38Z INFO CommandSettings] Arg 'url': 'https://dev.azure.com/organization/'
[2022-02-05 18:38:38Z INFO EnvironmentVMResourceConfigProvider] url - https://dev.azure.com/organization/
[2022-02-05 18:38:38Z INFO ConfigurationManager] GetCredentialProvider
[2022-02-05 18:38:38Z INFO CommandSettings] Arg 'auth': 'PAT'
[2022-02-05 18:38:38Z INFO ConfigurationManager] Creating credential for auth: PAT
[2022-02-05 18:38:38Z INFO CredentialManager] GetCredentialProvider
[2022-02-05 18:38:38Z INFO CredentialManager] Creating type PAT
[2022-02-05 18:38:38Z INFO CredentialManager] Creating credential type: PAT
[2022-02-05 18:38:38Z INFO PersonalAccessToken] EnsureCredential
[2022-02-05 18:38:38Z INFO CommandSettings] Arg 'token': '***'
[2022-02-05 18:38:38Z INFO PersonalAccessToken] GetVssCredentials
[2022-02-05 18:38:38Z INFO PersonalAccessToken] token retrieved: 52 chars
[2022-02-05 18:38:38Z INFO PersonalAccessToken] cred created
[2022-02-05 18:38:38Z INFO ConfigurationManager] cred retrieved
[2022-02-05 18:38:38Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2022-02-05 18:38:38Z WARN VisualStudioServices] Attempt 1 of GET request to https://dev.azure.com/organization/_apis/connectionData?connectOptions=1&lastChangeId=320929845&lastChangeId64=320929845 failed (Socket Error: ConnectionReset). The operation will be retried in 10,8320613 seconds.
[2022-02-05 18:38:49Z WARN VisualStudioServices] Attempt 2 of GET request to https://dev.azure.com/organization/_apis/connectionData?connectOptions=1&lastChangeId=320929845&lastChangeId64=320929845 failed (Socket Error: ConnectionReset). The operation will be retried in 13,2434562 seconds.
[2022-02-05 18:39:03Z WARN VisualStudioServices] Attempt 3 of GET request to https://dev.azure.com/organization/_apis/connectionData?connectOptions=1&lastChangeId=320929845&lastChangeId64=320929845 failed (Socket Error: ConnectionReset). The operation will be retried in 15,8216932 seconds.
[2022-02-05 18:39:18Z ERR  VisualStudioServices] Attempt 4 of GET request to https://dev.azure.com/organization/_apis/connectionData?connectOptions=1&lastChangeId=320929845&lastChangeId64=320929845 failed (Socket Error: ConnectionReset). The maximum number of attempts has been reached.
[2022-02-05 18:39:18Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2022-02-05 18:39:18Z INFO LocationServer] Unable to connect to https://dev.azure.com/organization/.
[2022-02-05 18:39:19Z ERR  LocationServer] System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
 ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
 ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
   --- End of inner exception stack trace ---
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
   at System.Net.FixedSizeReader.ReadPacketAsync(Stream transport, AsyncProtocolRequest request)
   at System.Net.Security.SslStream.ThrowIfExceptional()
   at System.Net.Security.SslStream.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.SslStream.EndProcessAuthentication(IAsyncResult result)
   at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
   at System.Net.Security.SslStream.<>c.<AuthenticateAsClientAsync>b__65_1(IAsyncResult iar)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
 

Stu*_*urf 5

如果人们仍然遇到这种情况,我找到了一个脚本来检查所有问题并生成一个有效的解决方案:-)

Azure DevOps TLS 1.2 过渡准备情况检查器

Azure DevOps 服务(与许多其他 Microsoft 服务一样)正在过渡,以弃用传输协议 TLS 1.0、TLS 1.1 和一些被认为较弱的 TLS 1.2 密码套件。

请参阅 Azure DevOps 团队的公告:https://devblogs.microsoft.com/devops/deprecating-weak-cryptographic-standards-tls-1-0-and-1-1-in-azure-devops-services/

该项目的目的是简化过渡准备工作。我们收集了客户报告的最常见的 TLS 兼容性问题,并制作了一个脚本来检测这些问题并指导用户采取缓解措施。

运行脚本:

AzureDevOpsTls12Analysis.ps1

在 Powershell 版本 4 或更高版本中运行。仅适用于 Windows,该脚本已在 Windows Server 2012 R2 及更高版本上进行了测试。

该脚本的作用:

  • 通过打开与https://status.dev.azure.com的测试安全连接来执行探测。此站点需要 TLS 1.2 和强大的密码套件,在 TLS 1.0 和 1.1 协议弃用后,所有 Azure DevOps 站点也将如此。
    • 该探测器可以识别问题何时是网络连接或 DNS 解析问题,何时是由 TLS 不兼容引起。
    • 成功的探测证明操作系统允许 TLS 1.2 并且至少有一个所需的密码套件可用。这并不保证从该计算机连接到 Azure DevOps 的所有其他软件都能正常运行,不会出现 TLS 问题。
  • 通过查看选定的 Windows 注册表项来执行操作系统级别问题的分析,这些注册表项启用/禁用 TLS 1.2 协议并影响可用密码套件集。操作系统级配置由所有使用操作系统提供的 HTTPS/TLS 堆栈的软件共享。
  • 执行 .NET Framework 分析:检查 Windows 注册表中安装的 .NET Framework 版本和配置。
    • 查找是否存在注册表更改,这些更改使针对 4.7 之前的 .NET Framework 版本构建的 .NET 应用程序能够利用操作系统支持的 TLS 功能。如果没有这些更改,即使操作系统启用了 TLS 1.2,旧的 .NET 应用程序也将默认使用 TLS 1.0。
    • 如果您不打算在计算机上使用通过网络进行通信的旧版 .NET 程序,则无需应用这些程序。

脚本没有什么:

  • 该脚本本身不执行任何缓解措施。它仅打印缓解建议,其中包含文档文章的 URL 和要执行的步骤(要调用的 cmdlet 或要进行的注册表更改)。
  • 该脚本不需要提升权限即可运行。
  • 该脚本无法判断特定应用程序是否存在 TLS 问题。有些应用程序具有选择硬编码或配置的 TLS/SSL 版本。

来源和脚本:

https://github.com/microsoft/azure-devops-tls12