致命:无法访问'.git / config':权限被拒绝

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

致命:无法访问'.git / config':Permission denied

我最近没有更改任何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':权限被拒绝

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

发布评论

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

>www.elefans.com

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