{{tag>Brouillon git TLS CA}} # Git over HTTPS - conf client Voir aussi : * [[Notes git et cerfificats HTTPS]] ~~~bash git clone https://user@git.acme.fr/user/projet ~~~ ## Méthode credential.helper ~~~bash git config --global credential.helper 'cache --timeout 32400' ~~~ Pour désactiver credential.helper temporairement ~~~bash git -c credential.helper= push ~~~ Effacer toutes les autorisations du cache (forgetting all cached credentials) ~~~bash git credential-cache exit ~~~ ## Méthode netrc (déconseillé) **Méthode à éviter, car le mot de passe est enregistré en clair** `~/.netrc` ~~~ machine git.acme.fr login user password P@ssw0rd ~~~ ~~~bash chmod 600 ~/.netrc ~~~ Voir `man netrc` Voir aussi `http.extraHeader` ou alors ~~~bash git config --global credential.helper store ~~~ ## http.extraHeader Exemples ~~~bash 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 ~~~