Py学习  »  Git

无法在.gitconfig文件中添加(任何)全局Git配置

madhusdhnn • 6 年前 • 324 次点击  

我最近尝试将git的配置添加为全局配置。例如 git config --global core-editor "vim" 是的。我得到了下面给出的错误。

error: could not write config file /home/admin/.gitconfig: Operation not permitted

我也试着加上 git config --global color.ui always 是的。为此,在终端中也会抛出上述错误。

请帮帮我。

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/48919
文章 [ 1 ]  |  最新文章 6 年前
Gowtham
Reply   •   1 楼
Gowtham    7 年前

检查是否 immutable(i) 已为该文件设置属性。启用此属性时,我们无法更改、重命名或删除文件。尝试下面的命令。

sudo chattr -i .gitconfig

请访问 this 链接以获取更多详细信息。