Visual Studio 2015 和 Git 错误:打开(“somefile.VC.opendb”):权限被拒绝致命:无法处理路径 myfile.VC.opendb
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34975423/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Visual Studio 2015 & Git error: open("somefile.VC.opendb"): Permission denied fatal: Unable to process path myfile.VC.opendb
提问by pookie
Setup:
设置:
- Windows 10
- Visual Studio 2015 with update
- Running in Administrator mode
- 视窗 10
- 带有更新的 Visual Studio 2015
- 以管理员模式运行
I cannot commit my changes using Visual Studio 2015 because the commit option does not appear.
我无法使用 Visual Studio 2015 提交更改,因为未显示提交选项。
When I go to the source folder and try to commit from there, I have n changed files and so I click "Stage Changed" which brings up a dialogue "Stage n
untracked files?", to which I click "Yes".
当我转到源文件夹并尝试从那里提交时,我已经更改了 n 个文件,因此我单击“ Stage Changed”,这会弹出一个对话框“ Stage n
untracked files?”,然后单击“是”。
I am then presented with a failure error:
然后我会看到一个失败错误:
error: open("myfile.VC.opendb"): Permission denied fatal: Unable to process path myfile.VC.opendb
错误:打开(“myfile.VC.opendb”):权限被拒绝致命:无法处理路径 myfile.VC.opendb
Where myfile
is just the name of some arbitrary file.
哪里myfile
只是某个任意文件的名称。
However, if I close the solution and then try commit from the folder, it all works as intended...
但是,如果我关闭解决方案,然后尝试从文件夹提交,则一切都按预期工作......
What is going on here? I have all the updates.
这里发生了什么?我有所有更新。
回答by jessehouwing
The .opendb
file was added in Visual Studio 2015 update 1, but was not added to the default .gitignore
file until after the release of update 1.
该.opendb
文件已添加到 Visual Studio 2015 更新 1 中,但.gitignore
直到更新 1 发布后才添加到默认文件中。
You can use the updated version, found here, the .opendb
extension was added on Dec 1 2015:
您可以使用此处找到的更新版本,该.opendb
扩展是在 2015 年 12 月 1 日添加的:
回答by codingatty
I also had this problem going from Visual Studio Express 2013 to Visual Studio Community 2017, for the same reason. I found this question and answer useful, but resolved it slightly differently.
出于同样的原因,我也遇到了从 Visual Studio Express 2013 到 Visual Studio Community 2017 的问题。我发现这个问题和答案很有用,但解决方法略有不同。
I deleted the .gitignore file (actually, just moved it out just in case this didn't work) and in the Team Explorer window, went to Settings / Git / Repository Settings / Ignore and Attributes files. Under "Ignore file" it said "There was no .gitignore file found", and next to it there was an "Add" button. Clicking "Add" generated the default VSC 2017 .gitignore file and resolved the problem.
我删除了 .gitignore 文件(实际上,只是将其移出以防万一这不起作用)并在 Team Explorer 窗口中,转到 Settings / Git / Repository Settings / Ignore 和 Attributes 文件。在“忽略文件”下,它说“没有找到 .gitignore 文件”,旁边有一个“添加”按钮。单击“添加”生成了默认的 VSC 2017 .gitignore 文件并解决了问题。
回答by Miguel Gutierrez
I had the same problem on the Team Explorer-Home go to settings -> repository settings-> Ignore & Attributes File -> click on addthen on Team Explorer-Home-> global settings -> enable push -- forceand that worked for me .
我在团队资源管理器-主页上遇到了同样的问题,转到设置-> 存储库设置-> 忽略和属性文件->单击添加,然后在团队资源管理器-主页-> 全局设置->启用推送-强制,这对我 。