无法访问"/Users/dida/.config/git/attributes":权限被拒绝 [英] unable to access '/Users/dida/.config/git/attributes': Permission denied

查看:172
本文介绍了无法访问"/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":权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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