linux - 无法使用 git 命令 - 不允许操作

标签 linux git github

使用git命令时出现以下错误

git fetch 
error: cannot open .git/FETCH_HEAD: Permission denied

在执行 chmod 时,我得到了,

sudo chmod 777 .git/FETCH_HEAD 
sudo: unable to change to sudoers gid: Operation not permitted
sudo: setresuid() [0, 0, 0] -> [117, -1, -1]: Operation not permitted

请指出可能是什么问题?

最佳答案

要从“sudo”使用,您的帐户必须在 sudoer 组中。使用“usermod”将您添加到“sudo”组。或者您可以使用“su”并使用“root”运行 chown 或 chmod 命令。

关于linux - 无法使用 git 命令 - 不允许操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20262685/

相关文章:

c - 如何通过cron作业调度程序调用C程序上的函数以每天在ubuntu中调用该函数?

linux - 如何在 Linux 中以 root 权限运行脚本

linux - linux中运行Electron的最小gui系统是什么

xml - 解析 git 日志输出,最好是 xml

ruby - 使用 Ruby & Github API 按日期过滤提交

Arch-Linux/arm 上的 C++ MySQL 连接器

git - Google 的基于主干的开发 - 您是否将代码直接推送到发布分支而不是主干?

没有/a/b 的 Git diff 补丁?

android - app-release-unsigned.apk 未签名

配置文件等的 Git 最佳实践