I am using git-scm and tried to push to a repository. Upon doing so, I was greeted with the following message:
fatal: unable to get credential storage lock: File
in my case on windows there was a git credentials .lock added in my c:\users\xxxx directory where all global git config lives.
i deleted the lock file which also removed the git credentials file that stored my password in clear text
I followed the instructions listed before in this thread and excecute this command: git config --list --show-origin
, after that it shows the locations where git has any type of configuration, like this: file:"C:\ProgramData/Git/config" , "file:C:/Users/User/.gitconfig" , "file:.git/config".
Then I dive into the folder file:C:/Users/User/ and remove the file called: .git-credentials.lock , then excecute "git pull origin branch" again and it works !!
The error message comes from git credential-store (click for documentation page). It indicates that another instance of the credential storage program is currently running and has locked the file that (insecurely, in plain-text) stores your password.
If no other instance of git credential-store
is actually running, the lock file is no doubt left over from a previous run, and you can simply remove it. Unfortunately the program fails to tell you the location of the specific credentials file (but see the documentation for likely locations).