This will happen, if the user home directory is not writable by the user.
git config --global
needs to create a "lock" file (~/.gitconfig.lock
) in user home directory.
Check the permissions and try to create one.
# cat ~/.gitconfig.lock
cat: /home/users/developer/.gitconfig.lock: No such file or directory
# touch ~/.gitconfig.lock
## Now check, if a file has been created?
# cat ~/.gitconfig.lock
#
NOTE: If it succeeds, You must delete this file, otherwise git will throw another error!
If a user has no permission of creating this file, You must check and change permissions for the home directory.