问题描述
我知道有关于'无法取消链接'警告的git有类似的问题,但我一直无法使用它们。
主要不同之处在于,这是在我没有以任何方式处理子模块时发生的(我之前从未处理过它们)。我创建了一个名为'升级'的分支,删除了我的旧框架文件,并复制到新的框架文件中。我使用git add -A,然后执行所有操作。当我尝试结帐中继线分支时,它发生了以下错误:
警告:无法取消链接requirements / views / sk /index.php:权限被拒绝
警告:无法取消链接要求/视图/ sv / index.php:权限被拒绝
警告:无法取消链接要求/ views / zh / index.php:权限被拒绝
警告:无法取消链接要求/视图/ zh_CN / index.php:权限被拒绝
警告:无法取消链接要求/视图/ zh_tw / index.php:权限被拒绝
...等。有数百个。
起初我以为这只是一个权限问题,所以我递增地将组写入权限添加到整个需求目录中,但没有改变。
编辑:正如下面的答案中所建议的,我试图做同样的事情,但其他所有事情都关闭了。我没有比以前更幸运了。
这个问题特别虚弱,因为我无法移动到主干以恢复正常开发。
非常感谢,
Daniel Moniz
我通常会在没有释放这些文件句柄的情况下看到这种错误。
确保没有任何内容在运行,然后再次尝试您的结帐。注意:它也可以与安装Git的方式相关(在Windows上,如果msysgit安装在 C:中,则UAC可能会产生问题: \程序
或 C:\程序文件
,请参阅和 issue 437的评论2)
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 this happened when I have not been dealing with submodules in any way (I have never dealt with them before). I created a branch called 'upgrade', deleted my old framework files, and copied in the new ones. I used git add -A, then committed everything. When I tried to checkout the trunk branch, it responded with the following errors:
warning: unable to unlink requirements/views/sk/index.php: Permission denied
warning: unable to unlink requirements/views/sv/index.php: Permission denied
warning: unable to unlink requirements/views/zh/index.php: Permission denied
warning: unable to unlink requirements/views/zh_cn/index.php: Permission denied
warning: unable to unlink requirements/views/zh_tw/index.php: Permission denied
...etc. There are hundreds of them.
At first I thought this was simply a permissions problem, and so I added group write permissions to the entire requirements directory recursively, but there was no change.
Edit: As suggested in an answer below, I attempted to do the same thing but with everything else closed. I had no more luck than before.
This issue is particularly debilitating as I cannot move to trunk to get back to normal development.
Thanks a lot,
Daniel Moniz
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)
这篇关于Git Checkout警告:无法取消链接文件,拒绝权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!