[JENKINS-24786] Environment variables are not expanded in git publisher

Fix: Git publisher fails if remote repository configuration contains
environment variables
Minimize diffs
Merge pull request #1 from MarkEWaite/master-dfigus-jenkins_24786

Reduce diffs - white space changes not needed