Azure Blob存储映射Azure VM的Git仓库疑似所有权问题求助
问题:Azure Blob存储映射目录下Git命令权限错误
环境信息
- 系统:Windows 11
- Git版本:Git for Windows 2.37.3
- 运行环境:Azure虚拟机
- 操作目标:映射至虚拟机的Azure Blob存储内的Git仓库
错误现象
执行git status、git branch --track、git fetch --all、git pull --all命令时,触发以下错误:
fatal: detected dubious ownership in repository at '<path>' '<path>' is owned by: 'S-1-5-18' but the current user is: 'S-1-5-21-1990399924-2863569968-2306271318-500' To add an exception for this directory, call: git config --global --add safe.directory '%(prefix)///<path>'
已尝试的无效操作
- 执行指定路径的全局安全目录配置:
git config --global --add safe.directory '%(prefix)///<path>' - 执行通配符全局安全目录配置:
git config --global --add safe.directory '*' - 递归修改目录及文件所有权:
TAKEOWN /F * /R
注:以上操作在虚拟机本地文件夹中执行均正常,但在Azure Blob存储映射目录下无法解决问题,寻求可行方案。
内容的提问来源于stack exchange,提问作者Josh De Juan
相关产品推荐
相关产品推荐

