无法打开git / commit_editmsg [英] could not open git/commit_editmsg

查看:154
本文介绍了无法打开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 using 0777 as it is not secure)

这篇关于无法打开git / commit_editmsg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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