The global option remotes.git_credentials is used to set the git credentials.

git_credentials()