Git添加错误:无法打开目录:权限被拒绝 [英] Git add errors: Could not open directory: Permission Denied

查看:1200
本文介绍了Git添加错误:无法打开目录:权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Windows10.当我键入命令"git add"时.在我的Git Bash中,我不断收到此消息,如下所示:

I am using windows 10. When I type the command "git add ." in my Git Bash I keeping getting this message as shown below:

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

In case someone else comes here when searching for this error, and they are definitely on the correct path already, this issue may be caused by unsaved files in the working directory - try making sure all files are saved, and closing any IDE that is open

这篇关于Git添加错误:无法打开目录:权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆