Fix env variables to set for git config to work

Make it more robust, less complicated
Just fine!