windows - Git添加错误:无法打开目录:权限被拒绝
问题描述
我使用的是 Windows 10。当我键入命令“git add”时。在我的 Git Bash 中,我不断收到此消息,如下所示:
warning: could not open directory 'AppData/Local/Application Data/': Permission denied
warning: could not open directory 'AppData/Local/ElevatedDiagnostics/': Permission denied
warning: could not open directory 'AppData/Local/History/': Permission denied
warning: could not open directory 'AppData/Local/Microsoft/Windows/INetCache/Content.IE5/': Permission denied
warning: could not open directory 'AppData/Local/Microsoft/Windows/Temporary Internet Files/': Permission denied
warning: could not open directory 'AppData/Local/Temporary Internet Files/': Permission denied
warning: could not open directory 'Application Data/': Permission denied
warning: could not open directory 'Cookies/': Permission denied
warning: could not open directory 'Documents/My Music/': Permission denied
warning: could not open directory 'Documents/My Pictures/': Permission denied
warning: could not open directory 'Documents/My Videos/': Permission denied
warning: could not open directory 'Local Settings/': Permission denied
warning: could not open directory 'My Documents/': Permission denied
warning: could not open directory 'NetHood/': Permission denied
warning: could not open directory 'PrintHood/': Permission denied
warning: could not open directory 'Recent/': Permission denied
warning: could not open directory 'SendTo/': Permission denied
warning: could not open directory 'Start Menu/': Permission denied
warning: could not open directory 'Templates/': Permission denied
解决方案
如果其他人在搜索此错误时来到这里,并且他们肯定已经在正确的路径上,则此问题可能是由工作目录中未保存的文件引起的 - 尝试确保所有文件都已保存,并关闭任何打开的 IDE
推荐阅读
- database-migration - 引用表“产品”中没有与外键中的引用列列表匹配的主键或候选键
- php - 无法同时运行本地站点和 api laravel
- python - 本地比较两个 Pandas 数据框
- git - b/w 'git diff HEAD' 和 'git diff HEAD HEAD~1' 有什么区别?
- javafx - 使用Jpackage时如何解决ResourceEditor报错
- python - 在 Python 中计算幅度调制
- visual-studio - 如何使用 selenium 在 webdriver 上查找图像,然后在 WinForm 上显示
- html - Bootstrap 移动响应式页面
- python - Matplotlib tweek 标签算法?
- java - 列表到 Java 中的对映射