无法访问"/Users/dida/.config/git/attributes":权限被拒绝

编程入门 行业动态 更新时间:2024-10-28 12:16:40
本文介绍了无法访问"/Users/dida/.config/git/attributes":权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我执行一些git操作(例如'git diff'或'git add .')时,它显示警告:

When I do some git operations, such as 'git diff' or 'git add .', it shows that warning:

unable to access '/Users/dida/.config/git/attributes': Permission denied

我想知道哪个配置做错了,如何解决? 最好使用一些命令,我​​使用的是Mac命令行

I wonder which config I did wrong and how can I fix it? It's better with some commands, I am using mac command line

推荐答案

似乎您已运行sudo -H,并且sudo将某些文件的所有权更改为root.取回文件:

Seems you've run sudo -H and sudo changed the ownership of some files to root. Take the files back:

sudo chown -R dida /Users/dida

更多推荐

无法访问"/Users/dida/.config/git/attributes":权限被拒绝

本文发布于:2023-10-21 19:57:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1515255.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:被拒   无法访问   权限   Users   config

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!