Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual Studio 2019+;捆绑Git-SChannel加密提供程序在独立Git安装成功时失败 背景_Git_Tfs_Ssl Certificate_Visual Studio 2019_Schannel - Fatal编程技术网

Visual Studio 2019+;捆绑Git-SChannel加密提供程序在独立Git安装成功时失败 背景

Visual Studio 2019+;捆绑Git-SChannel加密提供程序在独立Git安装成功时失败 背景,git,tfs,ssl-certificate,visual-studio-2019,schannel,Git,Tfs,Ssl Certificate,Visual Studio 2019,Schannel,我们的组织通过使用域控制器上的组策略分发内部证书。对于我们的git安装,这意味着我们需要将“Windows安全通道”库用于HTTPS连接,而不是OpenSSL 问题 尝试使用VS2019 Enterprise bundled Git with schannel连接到远程Git存储库失败,错误为: schannel:next InitializeSecurityContext失败:未知错误(0x80092013)-吊销功能无法检查吊销,因为吊销服务器处于脱机状态 当我使用VS2019 UI尝试与

我们的组织通过使用域控制器上的组策略分发内部证书。对于我们的git安装,这意味着我们需要将“Windows安全通道”库用于HTTPS连接,而不是OpenSSL


问题 尝试使用VS2019 Enterprise bundled Git with schannel连接到远程Git存储库失败,错误为:

schannel:next InitializeSecurityContext失败:未知错误(0x80092013)-吊销功能无法检查吊销,因为吊销服务器处于脱机状态

当我使用VS2019 UI尝试与回购同步时,以及通过命令行运行时,都会出现此错误。(我使用的可执行文件路径是
C:\ProgramFiles(x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd\Git.exe

但是,如果我运行与VS2017捆绑的git可执行文件,我可以成功地与repo同步(可执行文件路径:
C:\ProgramFiles(x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\git\cmd\git.exe
)。但是,如果我打开VS2017并尝试使用UI,我会得到与上面相同的schannel错误


总结 执行git的独立安装并使用Windows安全通道进行设置成功连接到远程存储库

无论是使用IDEUI还是通过命令行,VS2019捆绑git都无法工作

VS2017捆绑git在命令行中工作,但不通过IDE UI


配置文件 我的global.gitconfig如下所示:

[user]
    name = xxx
    email = xxx@xxx.com
[http]
    sslBackend = schannel

[core]
    symlinks = false
    autocrlf = true
[color]
    diff = auto
    status = auto
    branch = auto
    interactive = true
[pack]
    packSizeLimit = 2g
[help]
    format = html
[diff "astextplain"]
    textconv = astextplain
[rebase]
    autosquash = true
[filter "lfs"]
    clean = git-lfs clean -- %f
    smudge = git-lfs smudge -- %f
    process = git-lfs filter-process
    required = true
[include]
    ; include Git for Windows' system config in order
    ; to inherit settings like `core.autocrlf`
    path = C:/Program Files (x86)/Git/etc/gitconfig
    path = C:/Program Files/Git/etc/gitconfig
VS2019.gitconfig如下所示:

[user]
    name = xxx
    email = xxx@xxx.com
[http]
    sslBackend = schannel

[core]
    symlinks = false
    autocrlf = true
[color]
    diff = auto
    status = auto
    branch = auto
    interactive = true
[pack]
    packSizeLimit = 2g
[help]
    format = html
[diff "astextplain"]
    textconv = astextplain
[rebase]
    autosquash = true
[filter "lfs"]
    clean = git-lfs clean -- %f
    smudge = git-lfs smudge -- %f
    process = git-lfs filter-process
    required = true
[include]
    ; include Git for Windows' system config in order
    ; to inherit settings like `core.autocrlf`
    path = C:/Program Files (x86)/Git/etc/gitconfig
    path = C:/Program Files/Git/etc/gitconfig
gitconfig如下所示(与VS2019完全相同):


您可以尝试以下步骤:

  • 删除文件夹(如果需要恢复,您可以备份此文件夹):
    C:\ProgramFiles(x86)\Microsoft Visual Studio\2019\xxx\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git

  • 确保您的系统上没有安装Git版本。一旦你有了Git,在控制面板/卸载程序中卸载它们

  • 下载并安装Git的

  • 在Git shell中运行此命令以禁用吊销检查:

    $git config--global http.schannelCheckRevoke false

    注:

    发件人:

    我们不建议为普通Git设置此配置值 用法。这是一个“逃生舱”,用于以下情况: 网络管理员限制了SChannel的正常使用 Git试图使用的Windows上的API


  • 您可以尝试以下步骤:

  • 删除文件夹(如果需要恢复,您可以备份此文件夹):
    C:\ProgramFiles(x86)\Microsoft Visual Studio\2019\xxx\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git

  • 确保您的系统上没有安装Git版本。一旦你有了Git,在控制面板/卸载程序中卸载它们

  • 下载并安装Git的

  • 在Git shell中运行此命令以禁用吊销检查:

    $git config--global http.schannelCheckRevoke false

    注:

    发件人:

    我们不建议为普通Git设置此配置值 用法。这是一个“逃生舱”,用于以下情况: 网络管理员限制了SChannel的正常使用 Git试图使用的Windows上的API


  • 有趣的是,这只是第一步。对我来说足够修复它了,我想这会迫使VS退回到安装在机器上的git实例?虽然没有人知道为什么捆绑git失败了,但至少它现在起作用了。对我来说足够修复它了,我想这会迫使VS退回到安装在机器上的git实例?虽然没有人知道为什么捆绑git会失败,但至少它现在可以工作了。