Gre*_*rdt 2 git tfs git-tfs tls1.0
我使用 git-tfs 已经快 5 年了,然后有一天,我在运行时遇到以下错误git tfs fetch
:
TF400324: Team Foundation services are not available from server https://tfs.company.com/tfs/foo.
Technical information (for administrator):
The underlying connection was closed: An unexpected error occurred on a send.
The underlying connection was closed: An unexpected error occurred on a send.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Run Code Online (Sandbox Code Playgroud)
我什至打开 Fiddler 看看发生了什么,当我的笔记本电脑尝试连接时,TFS 服务器实际上断开了套接字。
在与我们的一位服务器管理员交谈后,我发现我们的 TFS 服务器上已禁用对 TLS 1.0 的支持,我想我已经找到了确凿的证据。我认为我的笔记本电脑正在尝试使用 TLS 1.0 连接到我们的服务器,这当然会导致服务器关闭套接字。
git tfs
如何更改连接到 Team Foundation Services 时使用的TLS 版本?
我发现了这一点,并且我怀疑在 Team Foundation Server 上禁用 TLS 1.0 是问题的根源。在谷歌搜索git tfs tls 1.0后,我偶然发现Enabling Strong cryptography for all .Net applications,这让我找到了解决办法。您需要为 .NET 应用程序启用强加密(呃,标题中是这么说的)。
打开 PowerShell 命令提示符,以提升的权限运行它
对于 64 位应用程序运行以下命令:
# set strong cryptography on 64 bit .Net Framework (version 4 and above)
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
Run Code Online (Sandbox Code Playgroud)针对 32 位应用程序运行此命令
# set strong cryptography on 32 bit .Net Framework (version 4 and above)
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
Run Code Online (Sandbox Code Playgroud)重启。
现在,我的机器很高兴地从 TFS 中提取了大约一百个签到。
归档时间: |
|
查看次数: |
5064 次 |
最近记录: |