git don't provide any way to pass credentials, that's a pity.
maven release is another topic. maven to use local environment for credentials vs settings <server> is just a nonsense.
About solutions, .netrc don't support concurrent builds on same slave, so that can't be an option. I'd prefer to setup a git-credentials store as a buidlwrapper. Need to investigate.
About criticity and security, in enterprise context a job will be restricted to development team, so I don't think this is such an issue.