Add ability to configure credentialId for git

Also add some specs for building xml config from git options