我使用 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
我什至打开 Fiddler 看看发生了什么,当我的笔记本电脑尝试连接时,TFS 服务器实际上断开了套接字。
与我们的一位服务器管理员交谈后,我发现我们的 TFS 服务器上已禁用对 TLS 1.0 的支持,我想我已经找到了确凿的证据。我认为我的笔记本电脑正在尝试使用 TLS 1.0 连接到我们的服务器,这当然会导致服务器关闭套接字。
如何更改 TLS 版本git tfs
连接到 Team Foundation Services 时使用?
我发现了这一点,并且我怀疑在 Team Foundation Server 上禁用 TLS 1.0 是问题的根源。谷歌搜索后git tfs tls 1.0我偶然发现为所有 .Net 应用程序启用强大的加密技术,这导致我解决了这个问题。您需要为 .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
-
针对 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
Reboot.
现在,我的机器很高兴地从 TFS 中提取了大约一百个签到。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)