无法打开git / commit_editmsg [英] could not open git/commit_editmsg
问题描述
我有一个连接到Dropbox文件夹的git存储库。
最近,我将笔记本电脑切换到另一台,现在我无法执行git commit -am功能。我不断收到此错误消息:
无法打开'.git / COMMIT_EDITMSG':Permission denied。
有什么想法?
感谢,
Liron
这是文件权限问题,当前登录的用户没有权限使用这些文件。
如果这是您的回购,您可以尝试:
sudo chown youruser -R yourrepodir / $
chmod
更改特定文件的权限(您应该避免使用 0777
,因为它不安全)
I have a git repository linked to a dropbox folder. Recently, I have switched my laptop to another, and now i can not perform the function "git commit -am". I keep getting this error message: "could not open '.git/COMMIT_EDITMSG': Permission denied.
Any ideas?
Thanks, Liron
This is an file permission issue, user you are currently logged on does not have permissions to use the files.
If that's your repo, you may try:
- switching to other user who owns the repo
- changing the owner of the repo (
sudo chown youruser -R yourrepodir/
) - changing the permissions for the particular files using
chmod
(you should avoid using0777
as it is not secure)
这篇关于无法打开git / commit_editmsg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!