My developers recently noticed some odd behavior. After the last restart of our Stash server we are getting the following when pushing / pulling to our Stash repositories:
git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
warning: unable to access '/root/.config/git/config': Permission denied
warning: unable to access '/root/.gitconfig': Permission denied
warning: unable to access '/root/.config/git/config': Permission denied
warning: unable to access '/root/.gitconfig': Permission denied
From what I've read this happens if the PATH variable contains '/root/'. How can I resolve this? It's still possible to commit without issue but it's a bit distracting and it'll take extra error handling for writing scripts.