我最近没有更改任何git设置。
此问题似乎有类似的问题,但我不知道如何找到 .git / config 所在的位置。我试着运行 git config --list --show-origin 但所有的git命令都给我同样的错误。
如何让git再次工作?如果有问题,我在Windows(无管理权限),使用Bitbucket。 解决方案
第一个测试是看看错误仍然存在:
- 适用于Windows的最新Git(解压缩Git 2.13 PortableGit-2.13.0 -64-bit.7z.exe ,例如在 C:\Git2.13 中) >
- 简化PATH。
在CMD中输入:
set PATH = C:\ WINDOWS \ system32; C:\ WINDOWS; C:\ WINDOWS \ SYSTEM32 \ Wbem; C:\ WINDOWS \ System32 \WindowsPowerShell\v1.0\ set GH = C:\Git2.13 set PATH =%GH%\ bin;%GH%\usr\bin ;%GH%\mingw64\bin;%PATH%然后输入' bash ',然后在bash会话中,试试你的 git config 或 git push 命令。
Git was working fine but when I tried to push today I got an error:
fatal: unable to access '.git/config': Permission denied
I have not changed any git settings recently.
This question seemed to be of a similar issue, but I am not sure how to find where the .git/config is located. I tried running git config --list --show-origin but all git commands give me the same error.
How do I get git working again? If it matters, I am on Windows (no admin privileges), using Bitbucket.
解决方案The first test is to see if the error persists with:
- the latest Git for Windows (uncompress Git 2.13 PortableGit-2.13.0-64-bit.7z.exe anywhere you want, for instance in C:\Git2.13)
- a simplify PATH.
In a CMD, type:
set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\ set GH=C:\Git2.13 set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%Then type 'bash', and in the bash session, try your git config or git push commands again.
更多推荐
致命:无法访问'.git / config':权限被拒绝
发布评论