Top community members
All Wiki Articles Create Wiki Article

Have you ever heard about encyclopedia for code?

What about: Wiki for Code project?

* because I've tried to share code and my solutions on different services and it was removed or I was unwelcomed
   - maybe it wasn't good place, but this one is.

if you think you have solution that can help someone, you are welcome to share this solution - Click here

Fix for error during git remove credential - git config --system --unset credential.helper - error: could not lock config file C:/Program Files/Git/mingw64/etc/gitconfig: Permission denied

0 contributions
12 points

1. Problem description:

When I run git config to remove credentials I get error:

$ git config --system --unset credential.helper
error: could not lock config file C:/Program Files/Git/mingw64/etc/gitconfig: 
Permission denied

Screenshot from Git Bash with this error:

Screenshot showing error - git config --system --unset credential.helper error: could not lock config file C:/Program Files/Git/mingw64/etc/gitconfig:  Permission denied - solution: https://dirask.com/q/9pYBkj

I use git bash on windows 10
How to solve it?

2. Solution:

  1. Open Git Bash as administrator
  2. Execute once again: $ git config --system --unset credential.helper
  3. And git config works without any errors

Screenshot from Git Bash when we run this command as administrator:

Screenshot showing FIX for error - git config --system --unset credential.helper error: could not lock config file C:/Program Files/Git/mingw64/etc/gitconfig:  Permission denied - solution: https://dirask.com/q/9pYBkj

How to open Git Bash as administrator?

  1. Click on Windows search
  2. Type Git Bash
  3. Click on it with second mouse button (right one)
  4. Click 'Run as administrator'
  5. If Popup dialog appears - click Yes
  6. Now we execute Git Bash commands with administrator rights

Link to post - How to open Git Bash as administrator?

3. Video with solution

References

  1. Git config - docs
0 contributions

Checkout latest Findings & News:

Checkout latest questions:

Checkout latest wiki articles:

Hey 👋
Would you like to know what we do?
  • Dirask is IT community, where we share coding knowledge and help each other to solve coding problems.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Read more