git config --global credential.helper 'cache --timeout 32400'
Pour désactiver credential.helper temporairement
git -c credential.helper='' push
Effacer toutes les autorisations du cache (forgetting all cached credentials)
git credential-cache exit
Méthode à éviter, car le mot de passe est enregistré en clair
machine git.acme.fr login user password P@ssw0rd
chmod 600 ~/.netrc
Voir man netrc
Voir aussi http.extraHeader
ou alors
git config --global credential.helper store
Exemples
git -c http.extraHeader="Authorization: Basic YmQ2MTY0Om82ZzV4YWU1Zm1xZXFkYmphdGRmamljaGRrNTVsd2VxNGp4eXQyanZ3dGp1enhkd3dneGE=" clone https://azuredevops.example.net/Main/MyProj/_git/MyRepo git config --global http.https://yourdomain/.extraheader "AUTHORIZATION: basic $(echo -n "x-access-token:${{ secrets.BOT_TOKEN }}" | base64)" git --config-env=http.extraheader=GIT_AUTH_HEADER clone https://dev.azure.com/yourOrgName/yourProjectName/_git/yourRepoName git config -l --local