You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

WSL2 Ubuntu中Git对接Azure Devops异常缓慢问题求助

WSL2 Ubuntu下Git对接Azure Devops异常缓慢问题求助

近几周在Windows 10的WSL2 Ubuntu环境中,执行git fetch、git pull或git clone Azure Devops仓库时,需要等待数分钟才有响应。但克隆Github仓库无异常,Windows系统中的Git(包括对接Azure Devops)运行正常,仅WSL2 Ubuntu环境对接Azure Devops时出现该问题。

已排查情况:

  • 排除挂载Windows目录导致的Git性能问题,所有操作均在Ubuntu家目录中进行
  • WSL2的Docker devcontainers中也出现相同问题,暂未定位到几周前引发故障的具体操作

性能日志

18:47:32.905545 read-cache.c:2306       performance: 0.000062544 s:  read cache .git/index 
18:53:48.594716 trace.c:475             performance: 0.000394139 s: git command: /usr/lib/git-core/git rev-list --objects --stdin --not --all --quiet --alternate-refs
18:53:48.602112 trace.c:475             performance: 0.001176611 s: git command: /usr/lib/git-core/git gc --auto
18:53:48.602259 trace.c:475             performance: 375.702683388 s: git command: git fetch -p
                                                     ============

Ubuntu端.gitconfig配置(Windows端配置基本一致)

[user]
    name = Anders H*******
    email = anders.h***@*****.eu
[credential]
    helper = /mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager.exe
[merge]
    tool = meld
[diff]
    tool = meld
[mergetool "meld"]
    keepBackup = false
    trustExitCode = false
[mergetool]
    prompt = false
[difftool "meld"]
    cmd = Meld.exe "$LOCAL" "$REMOTE"
[difftool]
    prompt = false
[credential "https://dev.azure.com"]
    useHttpPath = true

已尝试的解决动作:

  • 怀疑凭据管理冲突,卸载Github CLI并更新Git for Windows至最新版本,问题未解决
  • 猜测问题与同期开始使用VSCode的Docker devcontainers有关,但未找到关联线索

更新:使用SSH方式对接Azure Devops时无此问题,确认问题与凭据管理相关,但暂未明确具体原因,寻求解决思路。


内容的提问来源于stack exchange,提问作者Zenit_swe

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.01 06:45:30