git config --global user.name "chirrumishra" ✔
error: could not lock config file /Users/chiranjeevmishra/.gitconfig: No such file or directory
git config --list credential.helper
中唯一可用的数据
尝试使用brew重新安装git,但由于某些未知原因,它也无法工作
~ brew reinstall git INT х │ 7s
==> Downloading https://ghcr.io/v2/homebrew/core/git/manifests/2.33.0
Already downloaded: /Users/chiranjeevmishra/Library/Caches/Homebrew/downloads/b24ae98d6ab2b75abc62451721dc6191764b44543e218d5f937f6e85d4b11b17--git-2.33.0.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/git/blobs/sha256:1b89ec39f7a4b865b3c671f9b2495ec859925951
Already downloaded: /Users/chiranjeevmishra/Library/Caches/Homebrew/downloads/6a93895ce790e15c09265ac022b1830dc40f083404f5059ce8c0c99814c8074e--git--2.33.0.big_sur.bottle.tar.gz
==> Reinstalling git
==> Pouring git--2.33.0.big_sur.bottle.tar.gz
==> Caveats
The Tcl/Tk GUIs (e.g. gitk, git-gui) are now in the `git-gui` formula.
zsh completions and functions have been installed to:
/usr/local/share/zsh/site-functions
Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/git
==> Summary
? /usr/local/Cellar/git/2.33.0: 1,508 files, 42MB
==> `brew cleanup` has not been run in 30 days, running now...
Error: Permission denied @ apply2files - /usr/local/lib/docker/cli-plugins
~ git config --global credential.helper store 1 х │ 38s
error: could not lock config file /Users/chiranjeevmishra/.gitconfig: No such file or directory
使用的操作系统: Mac OS Big Sur 11.4 brew版本: Homebrew 3.2.9 git版本: git版本2.33.0
提前感谢
发布于 2021-09-04 11:52:48
要修复Permission denied
,可以运行以下命令:
sudo chown -R ${LOGNAME}:staff /usr/local/*
希望.gitconfig
的问题也能得到解决。
https://stackoverflow.com/questions/69054728
复制相似问题