Skip to content

01.dubious ownership

非常奇怪的一个现象:最近好像没有变更过用户相关的设置,怎么仓库的所有者权限就产生突变了?

在 PowerShell 下运行任意的 git 命令(例如 git remote)都会报错:

ps
fatal: detected dubious ownership in repository at 'D:/VitePress4/sbgong.github.io'
'D:/VitePress4/sbgong.github.io' is owned by:
        BUILTIN/Administrators (S-1-5-32-544)
but the current user is:
        ALOWREE-PRO16/Alowr (S-1-5-21-3705962455-1535216580-1835105370-1002)
To add an exception for this directory, call:

        git config --global --add safe.directory D:/VitePress4/sbgong.github.io

只好把仓库的所有者由 Administrators 变更为 Alowr 才算重新获取仓库的 Git 操作权限。

最近更新