Outils pour utilisateurs

Outils du site


tech:git_over_https_-_conf_client

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
tech:git_over_https_-_conf_client [2025/03/24 15:06] – créée - modification externe 127.0.0.1tech:git_over_https_-_conf_client [2025/11/10 15:46] (Version actuelle) Jean-Baptiste
Ligne 1: Ligne 1:
 {{tag>Brouillon git TLS CA}} {{tag>Brouillon git TLS CA}}
 +
  
 = Git over HTTPS - conf client = Git over HTTPS - conf client
 +
 +Voir aussi :
 +* [[Notes git et cerfificats HTTPS]]
 +
  
 <code bash> <code bash>
 git clone https://user@git.acme.fr/user/projet git clone https://user@git.acme.fr/user/projet
 </code> </code>
 +
 +
 +== Méthode credential.helper
 +
 +<code bash>
 +git config --global credential.helper 'cache --timeout 32400'
 +</code>
 +
 +
 +Pour désactiver credential.helper temporairement
 +<code bash>
 +git -c credential.helper='' push
 +</code>
 +
 +Effacer toutes les autorisations du cache (forgetting all cached credentials)
 +<code bash>
 +git credential-cache exit
 +</code>
 +
 +
 +== Méthode netrc (déconseillé)
 +
 +**Méthode à éviter, car le mot de passe est enregistré en clair**
  
 <code - ~/.netrc> <code - ~/.netrc>
Ligne 18: Ligne 46:
  
 Voir ''man netrc'' Voir ''man netrc''
 +Voir aussi ''http.extraHeader''
 +
  
 ou alors ou alors
Ligne 25: Ligne 55:
  
  
-== Si certificats auto-signés 
  
-<code bash> +== http.extraHeader
-git -c http.sslVerify=false clone https://example.com/path/to/git +
-</code>+
  
 +Exemples
 <code bash> <code bash>
-git config --global http.sslVerify false+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
 </code> </code>
- 
  
tech/git_over_https_-_conf_client.1742825205.txt.gz · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki