Windows Git: An unknown error occurred while reading configuration files

Previous questions, such as Cannot use git: "git fatal: unknown error while reading configuration files and about this error message:

G:\dev\some-repo> git status
fatal: unknown error occurred while reading the configuration files

... and the answers go through various basic troubleshooting methods for finding configuration files, ensuring that these paths are not directories, etc.

I confirmed that my file C:\Users\chas\.gitconfigis a file, and besides that, all configuration files can be read, as far as I can tell, or at least I see the values ​​from all locations I know:

$ git config -l --show-origin
fatal: error processing config file(s)
file:"G:\\Downloads\\Git\\mingw64/etc/gitconfig"        core.symlinks=false
file:"G:\\Downloads\\Git\\mingw64/etc/gitconfig"        core.autocrlf=true
file:"G:\\Downloads\\Git\\mingw64/etc/gitconfig"        color.diff=auto
file:"G:\\Downloads\\Git\\mingw64/etc/gitconfig"        color.status=auto
file:"G:\\Downloads\\Git\\mingw64/etc/gitconfig"        color.branch=auto
file:"G:\\Downloads\\Git\\mingw64/etc/gitconfig"        color.interactive=true
file:"G:\\Downloads\\Git\\mingw64/etc/gitconfig"        pack.packsizelimit=2g
file:"G:\\Downloads\\Git\\mingw64/etc/gitconfig"        help.format=html
file:"G:\\Downloads\\Git\\mingw64/etc/gitconfig"        http.sslcainfo=/ssl/certs/ca-bundle.crt
file:"G:\\Downloads\\Git\\mingw64/etc/gitconfig"        diff.astextplain.textconv=astextplain
file:"G:\\Downloads\\Git\\mingw64/etc/gitconfig"        rebase.autosquash=true
file:"G:\\Downloads\\Git\\mingw64/etc/gitconfig"        filter.lfs.clean=git-lfs clean -- %f
file:"G:\\Downloads\\Git\\mingw64/etc/gitconfig"        filter.lfs.smudge=git-lfs smudge -- %f
file:"G:\\Downloads\\Git\\mingw64/etc/gitconfig"        filter.lfs.process=git-lfs filter-process
file:"G:\\Downloads\\Git\\mingw64/etc/gitconfig"        filter.lfs.required=true
file:"G:\\Downloads\\Git\\mingw64/etc/gitconfig"        credential.helper=manager
file:C:/Users/chas/.gitconfig   user.name=Chas Emerick
file:C:/Users/chas/.gitconfig   user.email=chas@cemerick.com
file:C:/Users/chas/.gitconfig   push.default=matching

Note:

  • fatal: error processing config file(s) message preceding all configuration files
  • All of the above happens if I am in a repo or not.
  • , ,
  • C:\Users\chas\.gitconfig .
  • / "" git git - bash; git git - bash, git cmd.exe.
  • Git : 2.15.0; Windows 10 Pro, 1709, 16299.19

+4
1

,

  • git config -l -show-origin git ( , )
  • PATH ( - )

3 ( repo):

file:"C:\\ProgramData/Git/config"                     core.symlinks=false
...
file:"C:\\prgs\\git\\latest\\mingw64/etc/gitconfig"   core.symlinks=false
...
file:C:/Users/VonC/.gitconfig                         core.autocrlf=false

, , (C:\\ProgramData) .
. git Windows, ?".
" - git ":

Windows git :

  • .gitconfig $HOME (C:\Users\$USER ).
  • - /etc/gitconfig, MSys, , git Windows .
  • 2.x git Windows, C:\Documents and Settings\All Users\Application Data\Git\config Windows XP C:\ProgramData\Git\config Windows Vista .
    git config -f <file> .

. git-for-windows/git commit 153328b, libgit2 git Windows, , git, (, : ).

+2

Source: https://habr.com/ru/post/1689163/


All Articles