logo头像

老陕小张学技术接地气

Git代码更新报错

错误描述

git同步代码出现错误的原因有多种多样,本章给大家介绍一个window系统的git仓库权限问题,由于win10重装系统后,文件夹所有者变了,导致git pull等都出现了该问题。

PS D:\小萌计划\liberty\微信小程序> git pull
fatal: detected dubious ownership in repository at 'D:/小萌计划/liberty'
'D:/小萌计划/liberty' is owned by:
        'S-1-5-21-1352026588-2545222877-778235115-1001'
but the current user is:
        'S-1-5-21-2042668658-433506434-3672517647-1001'
To add an exception for this directory, call:

        git config --global --add safe.directory 'D:/小萌计划/liberty'

解决办法

更改文件权限

支付宝打赏 微信打赏

赞赏是不耍流氓的鼓励

-->