I reinstalled Manjaro Cinnamon 21.2.2-220123-linux515 trying to get rid of this error with no luck. I’ve only copied my dotfiles from an external drive and run the installation script.

Whenever I try a git init in any empty repository I get /git: permission denied. Which doesn’t tell me anything.

I’ve found that the error is produced because of this lines in the installation of my dotfiles:

  sudo tee -a /etc/profile /etc/zshenv /etc/zsh/zshenv &>/dev/null <<EOF
export XDG_CONFIG_HOME=$XDG_CONFIG_HOME
export ZDOTDIR=$ZDOTDIR
EOF

If I change the lines appended to those files and restart the system it doesn’t give me an error, but then my configuration isn’t loaded. But that could mean the error happens anywhere in my configuration and I don’t know how to find it.