Git Checkout warning: unable to unlink files, permission denied

后端 未结 26 1180
梦毁少年i
梦毁少年i 2020-12-04 08:46

I am aware that there are similar issues about git relating to the \'unable to unlink\' warning, but I have not been able to use them.

The main difference is that th

26条回答
  •  眼角桃花
    2020-12-04 09:14

    I usually see that kind of error when there is a process not releasing the handle of those files.

    Make sure nothing is running, and then try your checkout again.

    Note: it can also be related with the way Git has been installed (on Windows, UAC can generate problem if msysgit is installed in C:\Program or C:\Program Files, see "msysgit - sh.exe - fork: Permission denied - Vista 64 bit" and comment 2 of issue 437)

    Note: as illustrated below, a common other cause of the problem is rights issue on the directory (wrong owner), not necessarily on the file that can't be unlinked.

提交回复
热议问题