如何允许在Mac OS中访问git / config? [英] how to allow the access of git/config in mac os?

查看:658
本文介绍了如何允许在Mac OS中访问git / config?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个问题,因为当我跑扑医生时,它说。顺便说一句,我正在使用Mac OS

I having this problem because when I run flutter doctor it says . btw I'm using mac os

Failed to find the latest git commit date: VersionCheckError: Command exited
with code 128: git -c log.showSignature=false log -n 1 --pretty=format:%ad
--date=iso
Standard out: 
Standard error: warning: unable to access '.git/config': Permission denied
fatal: unable to access '.git/config': Permission denied

我在此链接,但是一个人说我应该检查用户,并且看到我是该用户的注册用户。我想我需要转到git文件夹并允许属性权限,但我不知道要进入macos的git文件夹

I ask this question in this link but one person said that I should check the user and I see that I'm the user registered there. I think I need to go to git folder and allow permission in properties but I don't know to get into git folder in mac os

推荐答案

.config文件夹应归用户所有。看来您的计算机上的所有权被错误地更改为系统。

The .config folder is supposed to be owned by the user. It appears that the ownership got changed to system by mistake on your machine.

使用以下命令,您可以恢复 默认权限在您的MacOS上:

With following command, you can restore the default permission on your MacOS:

sudo chown -R <username> .config

(替换< username> 您的用户名如下: whoami

(Substitute <username> with your username. You can find your username as follows: whoami)

在提示输入密码时,输入您的登录密码。

When prompted for a password, enter your login password.

这篇关于如何允许在Mac OS中访问git / config?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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