tech:git_over_https_-_conf_client
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tech:git_over_https_-_conf_client [2025/09/24 09:11] – Jean-Baptiste | tech:git_over_https_-_conf_client [2026/06/19 10:05] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | |||
| + | # Git over HTTPS - conf client | ||
| + | |||
| + | Voir aussi : | ||
| + | * [[Notes git et cerfificats HTTPS]] | ||
| + | |||
| + | |||
| + | ~~~bash | ||
| + | git clone https:// | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## 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 | ||
| + | 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=" | ||
| + | |||
| + | git config --global http.https:// | ||
| + | |||
| + | git --config-env=http.extraheader=GIT_AUTH_HEADER clone https:// | ||
| + | |||
| + | git config -l --local | ||
| + | ~~~ | ||
