无法使用git:"git致命:读取配置文件时发生未知错误" [英] Can't use git: "git fatal: unknown error occurred while reading the configuration files"
问题描述
我不能使用任何git命令,它们都会导致以下错误:
I can't use any git commands, they all result in the following error:
fatal: unknown error occurred while reading the configuration files
在我更换硬盘驱动器之前,Git工作正常.我创建了Windows 10系统映像并将其还原到新的硬盘驱动器上,然后将未分配的磁盘空间合并到我的主分区中.
Git was working fine up until I replaced my hard drive. I created a windows 10 system image and restored it on my new hard drive, and then combined the un-allocated disc space into my main partition.
我尝试重新安装和安装git,重新启动计算机并删除.gitconfig文件,以及几乎所有这些操作的组合.
I've tried re-installing and installing git, restarting my computer, and removing .gitconfig files, and pretty much every combination of those actions.
推荐答案
对我来说,问题是Users//中的.gitconfig
文件夹/目录.删除目录.gitconfig
解决了该问题,现在可以正常工作.
For me, the issue was .gitconfig
folder/dir in Users//. Deleting the dir .gitconfig
resolved the issue and it's working fine now.
这篇关于无法使用git:"git致命:读取配置文件时发生未知错误"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!