question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't access GIT config (Repository.Config) since v0.27.0

See original GitHub issue

Reproduction steps

Open an existing repository: Repository localRepository = new Repository(localPath);

Access localRepository.Config

Expected behavior

Repository.Config gives access to GIT configuration

Actual behavior

Any access of Repository.Config throws an exception:

the ProgramData file ‘config’ doesn’t exist: at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 154 at LibGit2Sharp.Core.Proxy.ConvertPath(Func2 pathRetriever) in /_/LibGit2Sharp/Core/Proxy.cs:line 3801 at LibGit2Sharp.Configuration..ctor(Repository repository, String repositoryConfigurationFileLocation, String globalConfigurationFileLocation, String xdgConfigurationFileLocation, String systemConfigurationFileLocation) in /_/LibGit2Sharp/Configuration.cs:line 46 at LibGit2Sharp.Repository.<>c__DisplayClass25_1.<.ctor>b__3() in /_/LibGit2Sharp/Repository.cs:line 220 at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) — End of stack trace from previous location — at System.Lazy`1.CreateValue()

Version of LibGit2Sharp (release number or SHA1)

0.27.0 et 0.27.1 (it works fine in 0.26.2

Operating system(s) tested; .NET runtime tested

Windows 11, .NET 6.0, console application.

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ozanneconsultingcommented, Apr 13, 2023

@bording I confirm this release fixes my problem. Thanks for your unbelievable reactivity.

1reaction
bordingcommented, Apr 12, 2023

Fixed in LibGit2Sharp v0.27.2.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git config not working · community · Discussion #22483
Try setting global config through command line by- git config --global user.email "MY_NAME@example.com" It automatically set the .gitconfig in ...
Read more >
git - Cannot find gitconfig file
Open your terminal or command prompt · Go to your repository's root directory by typing cd path/to/repository-directory · Once in your ...
Read more >
Why developers won't be able to find the gitconfig file
The reason they can't find gitconfig is simply because it's nowhere to be found.
Read more >
Git - git-config Documentation
On success, the command returns the exit code 0. A list of all available configuration variables can be obtained using the git help...
Read more >
ssh - How to tell git which private key to use?
The ssh command for git is either defined by the environment variable GIT_SSH_COMMAND (since git 2.3) or git config core.sshCommand (since git ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found