<
Git 的 safe.directory 报错 fatal unsafe repository
>
上一篇

[后续] git 的 safe.directory 报错 fatal unsafe repository
下一篇

Ubuntu 20.04 从 git 源码编译 3.25.1 版本的 git

Windows 的 git 版本在 2.35.2 及后,操作一下外置磁盘 git 仓库时会报

fatal: unsafe repository ('/storage/emulated/0/my-repo.git' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory /storage/emulated/0/my-repo.git

提示将路径添加到配置 safe.directory
按提示操作虽然可以,但是仓库多了很麻烦
建议还是降级到 2.35.1 测试可行

Git for Windows 下载地址
https://github.com/git-for-windows/git/releases

$ git --version
git version 2.35.1.windows.2

WSL 的 Ubuntu 的 git 还是低版本,未出现此问题

$ git --version
git version 2.25.1
Top
Foot