
myrepo$ git config --system core.editor "nano -w"
error: could not lock config file /etc/gitconfig: Permission denied
If you are trying to add or edit a system configuration file you will get a Permission denied error because you need special privileges to access it.
Fix:For the above example, it is better to set the core.editor at the user level using the --global configuration.
If you really want to set a property at the system level make use of sudo
sudo git config --system core.editor "nano -w"
Again you should have special privileges to do so, if not you will get sudoers error.
[sudo] password for user1:
user1 is not in the sudoers file. This incident will be reported.
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!