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.
Have Questions? Post them here!
- Git: Delete Branch Locally and Remotely at Origin
- How to change directory in Git bash
- [Solution] fatal: not a git repository (or any of the parent directories): .git
- Get List of all local branches git command
- How to check your installed version of Git
- fatal: Unable to create '/c/git_repo/.git/index.lock': File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier.
- git command to remove/unstage files from staging area
- fix fatal: --local can only be used inside a git repository error
- Github: How to Invite Collaborators
- How to Install Git on Windows
- Get the file location of git config values
- Change the default diff or commit editor for git
- GitHub: How to Search Code
- [fix] zsh: command not found: git
- Setup Git + Visual Studio Code Tutorial
- Fix [oh-my-zsh] Can't update: not a git repository
- [fix] fatal: this operation must be run in a work tree in git
- Git: Step-by-Step - How to Push Local Brach to GitHub
- How to ignore files in git using .gitignore file
- Rename git branch on Local and GitHub Remove using Command
- Change the default git branch name from master to main
- Github: fatal: Authentication failed Support for password was removed on August 13, 2021
- Git Remove Untracked Files using Command
- git fatal: Authentication failed error [fix]
- Git Rename master branch make to main using Command
- Delete Android Studio Projects - Android-Studio
- How to add borders to tkinter label text - Python
- How to get an embed code from Vimeo? - HowTos
- INSTALL_FAILED_INSUFFICIENT_STORAGE Android Error - Android
- Cmd command get current directory location - Windows
- Compare two text files in Notepad++ - NotepadPlusPlus
- How to activate and use Microsoft Teams Together mode - Microsoft
- How to Refresh Mac Desktop - MacOS