Git 2.35 报 dubious ownership 到底是 safe.directory 配错还是用户不对

陆零云 32 0
CI 镜像里跑 git status,直接报 fatal: detected dubious ownership in repository at '/data/app',后面还跟着一句建议 add safe.directory。Git 2.35 之后加的属主检查,仓库属主是 uid 1000,进程跑在 root 下,两者对不上就拒绝一切操作。 第一反应是 chown -R root:root /data/app,本地立刻好使。可这个目录是宿主挂进来的,改...