一、概述

        1、系统重装

        2、git重装

        3、项目在其他盘,重新拉取报错

        4、报错内容

Could not open repository.libgit2 returned: repository path 'F:/..../' isnot owned by current user.
To add an exception for this directory, call:git config --global --add safe.directoryF:/....

【Git】git | git重装,历史项目报错 | Could not open repository.libgit2 returned: repository path_系统重装

二、解决

1、项目所在目录,右键

【Git】git | git重装,历史项目报错 | Could not open repository.libgit2 returned: repository path_系统重装_02

 2、执行命令

git config --global --add safe.directory '${项目路径}'