Git is installed for the first time today. It appears when it is configured according to the tutorial
$ git config --global color.diff auto
error: could not lock config file C:/Program Files/Java/jdk1.7.0_71/.gitconfig: Permission denied
After several attempts, solution :
find git installation directory, set the properties of git-bash.exe, and tick “run this program as administrator” on the compatibility property page
The following is a record of the course at that time:
When I first met this problem, I guessed that git needed administrator permission, so I asked which git was, and I looked where git was
$ which git
/mingw64/bin/git
Then add administrator rights to the properties of/mingw64/bin/GIT. Exe. Naively, I thought it was solved in this way, but the result was:
$ git config --global color.diff auto
bash: /mingw64/bin/git: Permission denied
So I thought that the program that calls git.exe needs administrator permission. But who calls git.exe?Also try to modify the permissions of/CMD/git.exe,/bin/bash.exe,/bin/git.exe, and still report the same error
When there was no way out, I suddenly found git-bash.exe in the GIT root directory. As soon as I saw it, I modified the permissions of git-bash.exe and found that the problem was solved! After removing the previous redundant permissions, there is still no problem
It is concluded that just setting the permission of git-bash.exe is enough
Similar Posts:
- [Solved] su: warning: cannot change directory to : Permission denied ;-bash: bash_profile: Permission denied
- How to Solve Error: Linux permission denied
- macos -bash: yarn: command not found/-bash: cnpm: command not found
- SU: /BIN/BASH: PERMISSION DENIED [How to Solve]
- [Solved] NPM installation error: error: eacces: permission denied
- adb Permission denied [How to Solve]
- git bash bash: *: command not found
- Solution to the problem of bash: gulp: command not found after installing gulp in Windows system
- Git Bash Run “ssh-add pathName” Error: “Could not open a connection to your authentication agent.”
- [Solved] WARN checkPermissions Missing write access to /usr/local/lib/node_modules