致命:无法打开'.git / COMMIT_EDITMSG':权限被拒绝 [英] fatal: could not open '.git/COMMIT_EDITMSG': Permission denied

查看:5120
本文介绍了致命:无法打开'.git / COMMIT_EDITMSG':权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在github页面上部署octopress。我遵循以下指示:



http://octopress.org/docs / deploy / github /

这一切都运行良好,直到提交部分,我得到的错误:


fatal:无法打开'.git / COMMIT_EDITMSG':权限被拒绝

我是当然,我的github.io页面的拥有者,我从来没有遇到过这个问题。为什么会发生这种情况,更重要的是我该如何解决它?

解决方案

这不是远程Git存储库中的错误消息,这是本地文件的问题。您可能在同一个目录中使用了git(或rake)作为另一个用户(例如root),并且它创建了您现在无法覆盖的文件。



只需使用chown将文件的所有权更改为当前用户,例如:

  chown --recursive $(whoami)。 


I am trying to deploy octopress on github pages. I followed these instructions:

http://octopress.org/docs/deploying/github/

It all worked well until the commit part, where I get error:

fatal: could not open '.git/COMMIT_EDITMSG': Permission denied

I am the owner of my github.io page, of course, and I never had this issue before. Why is this happening, and more importantly how do I resolve it?

解决方案

This is not an error message from the remote Git repository, this is a problem with your local files. You probably used git (or rake) as another user (such as root) in this same directory, and it created files which you now can't overwrite.

Simply use chown to change the ownership of the files to your current user, for instance:

chown --recursive $(whoami) .

这篇关于致命:无法打开'.git / COMMIT_EDITMSG':权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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