error: could not lock config file C:/WINDOWS/system3

could not lock config file C:/WINDOWS/system32/config/systemprofile/.gitconfig: Permission denied

1 could not lock config file C:/WINDOWS/system32/config/systemprofile/.gitconfig: Permission denied表示在该文件夹中没有文件或者权限问题。

2找到.gitconfig文件

error: could not lock config file C:/WINDOWS/system3

3复制这个文件

4打开文件

C:/WINDOWS/system32/config/systemprofile/
error: could not lock config file C:/WINDOWS/system3

5 在重新登录

git config --global user.name “bryan sun”
git config --global user.email “[email protected]

6 成功