Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug] Windows: Git 2.48.1 被判定为低于 2.31,提示 "Git 2.31 or newer is required",仓库无法读取

Open
#1,566 2 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@AACS111 is already working on this.

Since Oct 29, 2026.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
git, rust
Domain
backend, devtools

Research direction

Start with rust/lithe-core/src/git/execution_policy.rs and inspect validate_version; then trace how lithe_git_host::configuration::version() obtains and caches Git's version on Windows. The report suspects empty probe output but has not verified the cause, so first reproduce with the provided Git 2.48.1 setup and inspect the probe result. Done means Git is recognized and the error distinguishes an empty or unparseable probe from an outdated version.

Written by the indexing model from the issue text.

Description

area:git bug claimed issue-form:bug P1 platform:windows review: low
Platform / 平台

Windows

Area / 模块

Git

Lithe version / Lithe 版本

0.6.5

Priority / 优先级

P1 / 尽快处理:使用体验大幅下降,但通常仍可继续使用

OS and architecture / 操作系统与架构

Windows 11 10.0.26200, AMD64

Environment / 环境信息

Git for Windows 2.48.1.windows.1(安装在 D:\Program Files\Git,非 C 盘)
命令行 git --version 正常:git version 2.48.1.windows.1

Steps to reproduce / 复现步骤
  1. 用 Lithe 打开含 Git 仓库的项目
  2. 提交面板提示“Git 无法读取此仓库”
  3. 设置 → 版本控制 → Git:把“Git 可执行文件”分别设为 bin\git.exe、cmd\git.exe;配置来源试过“当前仓库”和“全局 Git 配置”;保存、点“重新读取 Git 配置”、完全重启 IDE
  4. 报错不变
Expected behavior / 预期行为

识别到 Git 2.48.1,仓库正常读取。

Actual behavior / 实际行为

Git 2.31 or newer is required; select a newer executable in Git settings

命令行 git --version、git status 均正常(cmd\git.exe、mingw64\bin\git.exe、bin\git.exe 三个都输出 2.48.1)。
日志 %LOCALAPPDATA%\app.lithe.windows\logs\git\ 中全是 error_code=invalid_request,duration_ms 多为 0~1,没有具体原因。

初步分析(读源码所得,未能编译验证):报错来自 rust/lithe-core/src/git/execution_policy.rs 的 validate_version。解析逻辑本身没问题(带 .windows.1 后缀有单测覆盖),推测 lithe_git_host::configuration::version() 取到了空输出,被报成“版本过低”。该函数会缓存探测结果,空串也会被缓存;子进程以 CREATE_SUSPENDED + Job Object、stdin=NUL 启动,可能与本机磁盘加密驱动相互影响。建议:探测输出为空或无法解析时,错误信息带上原始输出和 exit code,并与“版本过低”区分;不缓存空结果。

Logs or diagnostic output / 日志或诊断输出
[scope=git.executionInspect] operation finished category=git error_code=invalid_request duration_ms=0
[scope=git.repositorySetup] operation finished category=git error_code=invalid_request duration_ms=1
Screenshots or recordings / 截图或录屏
Image Image
Checklist / 提交前检查
  • I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复报告。
  • I removed secrets and personal data from the report. / 我已从报告中移除敏感信息和个人数据。
Dominant language
TypeScript
Stars
1.8k
Forks
151
Avg merge
11h 43m
Merged PRs (30d)
345

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from 1lck/Lithe-IDEA

All issues in 1lck/Lithe-IDEA

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.