git
Ceci est une ancienne révision du document !
Table des matières
Git
Commandes utiles
$ git remote -v origin n3i@gitlab.paris.exalead.com:consulting/customers/edf/edf-hpc.git (fetch) origin n3i@gitlab.paris.exalead.com:consulting/customers/edf/edf-hpc.git (push)
Clone/Push avec erreur de ‘self signed certificate’
La commande de clone peut être la suivante :
git clone https://gitlab.paris.exalead.com/consulting/customers/bmw_plm.git
Mais, on peut avoir le message suivant :
fatal: unable to access 'https://gitlab.paris.exalead.com/consulting/customers/bmw_plm.git/': SSL certificate problem: self signed certificate in certificate chain
Pour y remédier, il faut utiliser le paramètre -c http.sslVerify=false
git config http.sslVerify false
Modification du mat de passe Git sous Windows
- Ouvrir 'Control Panel\User Accounts\Credential Manager'
- Choisir 'Windows Credentials'
- Dans la section 'Generic Credentials', modifier les mots de passe des utilisateurs 'git'
Utilisation de SSH-Agent pour rentrer le mot de passe une seule fois
Dans ~/.profile, mettre
env=~/.ssh/agent.env
agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; }
agent_start () {
(umask 077; ssh-agent >| "$env")
. "$env" >| /dev/null ; }
agent_load_env
# agent_run_state: 0=agent running w/ key; 1=agent w/o key; 2= agent not running
agent_run_state=$(ssh-add -l >| /dev/null 2>&1; echo $?)
if [ ! "$SSH_AUTH_SOCK" ] || [ $agent_run_state = 2 ]; then
agent_start
ssh-add
elif [ "$SSH_AUTH_SOCK" ] && [ $agent_run_state = 1 ]; then
ssh-add
fi
unset env
Pour tester
ssh -T git@gitlab.paris.exalead.com
git.1592407468.txt.gz · Dernière modification : (modification externe)
