Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • TortoiseGit TortoiseGit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 365
    • Issues 365
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TortoiseGitTortoiseGit
  • TortoiseGitTortoiseGit
  • Issues
  • #3153
Closed
Open
Created Feb 05, 2018 by Alan Davies@cs96and

"Failed to parse config file" if .gitconfig uses CRLF and contains blank lines

What steps will reproduce the problem?

  1. Install Tortoise Git preview version 2.5.7.0
  2. .gitconfig uses windows line endings (CRLF)
  3. .gitconfig contains blank lines
  4. Open the tortoise git log for a repository

What is the expected output? What do you see instead?

The Tortoise git log should appear. Instead I get the error...

Could not get HEAD hash.

libgit2 returned: failed to parse config file: Invalid configuation key (in C:\Users\Name/.gitconfig:4, column 0)

The error is pointing at line 4 of my .gitconfig which is a blank line. Converting the file to UNIX style (LF) or removing all the blank lines makes the error disappear.

What version of TortoiseGit and Git are you using? On what operating system?

Tortoise Git version 2.5.7.0

Windows 10 Version 1709 (OS Build 16299.214)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking