【问题标题】:How to skip SSL/TLS verification with Azure DevOps Migration Tools?如何使用 Azure DevOps 迁移工具跳过 SSL/TLS 验证?
【发布时间】:2021-07-26 04:54:41
【问题描述】:

我正在使用 Azure DevOps Migration Tools v11.9.47.0 将一些工作项从 https://azdevopsA/collectionA 迁移到 https://azdevopsB/collectionB(都是本地 Azure DevOps 2019),但出现错误发生。当我运行命令时:

.\migration.exe execute --config .\configuration.json

显示以下异常:

MigrationClient: Connecting to https://azdevopsA/collectionA/

[15:38:29 ERR] Unable to configure store

Microsoft.TeamFoundation.TeamFoundationServiceUnavailableException: TF400324: Azure DevOps services are not available from server https://azdevopsA/collectionA/. Technical information (for administrator):

The underlying connection was closed: Could not establish trust relationship for the SSL / TLS secure channel. ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL / TLS secure channel.
---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

我将自签名证书导入证书链没有任何问题。在浏览器中无需SSL/TLS验证就可以访问页面,但是当我尝试使用migration.exe工具时,出现上述问题。

【问题讨论】:

  • 无法获取您的最新信息。只是想检查以下答案是否对您有帮助?如果是,您可以accept the answer,这也可以使与您有相同困惑的其他人受益,我们可以将此线程存档。另外,如果仍有任何疑问,请随时在下面发表评论:-)

标签: tfs azure-devops-migration-tools


【解决方案1】:

连接失败可能是由于客户端和/或服务器配置为仅协商 TLS 1.2。以下情况可以查看解决方案:

https://developercommunity.visualstudio.com/t/azure-devops-api-could-not-establish-trust-relatio/410204

由于 Windows PowerShell 在 .NET Framework 4.5 上运行,因此不支持 默认开启TLS 1.2,无法建立连接。

对于每个脚本/每个会话的修复,运行以下命令以启用 TLS 1.2 支持:

[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12

可以找到有关 .NET Framework 版本和 TLS 的更多信息 这里: https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls

【讨论】:

    猜你喜欢
    • 2021-04-23
    • 2021-04-11
    • 2021-04-05
    • 1970-01-01
    • 2021-03-15
    • 1970-01-01
    • 2022-10-17
    • 2021-05-27
    • 2021-08-25
    相关资源
    最近更新 更多