gitgit-credential-winstore

warning: invalid credential line -- where is the line coming from?


I'm using a "Git Bash here" window on Windows 10. I'm getting this often (but not always) with git commands:

$ git pull
warning: invalid credential line: Unable to initialize the New Relic .NET Agent log file.  Please make sure the logs directory is writeable.
# after that warning, a standard git-gui--askpass window pops up to ask me for credentials.

I have viewed this and this and perhaps a few other questions. They didn't help.

I have deleted all git-related credentials from Windows Credential manager.

I have made certain that the New Relic .NET Agent is not installed on my machine anymore (if it ever was). I was wrong... see my answer

My best guess is that there is some file somewhere with this text in it

Unable to initialize the New Relic .NET Agent log file.  Please make sure the logs directory is writeable.

and that git is reading that file. How can I figure out what file it is?

Some more info about my machine, slightly redacted:

$ git --version
git version 2.27.0.windows.1

$ git config -l 
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
http.sslbackend=schannel
core.autocrlf=false
core.fscache=true
core.symlinks=false
pull.rebase=false
credential.helper=manager
user.name=rpresser
user.email=rpresser@****.com
gui.recentrepo=C:/Users/rpresser/source/repos/*****
gui.recentrepo=C:/Users/rpresser/source/repos/*****

$ cat ~/.gitconfig
[user]
        name = rpresser
        email = rpresser@****.com
[gui]
        recentrepo = C:/Users/rpresser/source/repos/*****
        recentrepo = C:/Users/rpresser/source/repos/*****

Solution

  • I have made certain that the New Relic .NET Agent is not installed on my machine anymore (if it ever was).

    Well, I was wrong. New Relic .NET Agent was still partially installed on my machine, and removing it did fix the problem.

    The message was happening because git-credential-manager.exe apparently invokes a .NET assembly to gain access to saved Windows credentials. (I discovered that by looking at ProcMon results.) The NewRelic profiler was configured to start up on every .NET launch and decide whether to attach the profiler. It was encountering that error -- denied access to the logs directory -- because the directory was only permitted to IIS application pools; I had been using NR agent a few months ago on my machine to debug how we use it on our servers.