From 561d52ac2bce15adbfaf3526d058d103f806434e Mon Sep 17 00:00:00 2001 From: Arnaud Legrand Date: Wed, 27 Mar 2019 12:59:52 +0100 Subject: [PATCH] Move some of Marie-Gabrielle's documention in our own documentation --- module2/ressources/gitlab.org | 31 +++++++++++++++++++++++++++++- module2/ressources/gitlab_fr.org | 33 +++++++++++++++++++++++++++++++- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/module2/ressources/gitlab.org b/module2/ressources/gitlab.org index 5e1d5b5..77066b1 100644 --- a/module2/ressources/gitlab.org +++ b/module2/ressources/gitlab.org @@ -67,7 +67,11 @@ apt-get update ; apt-get install git git config --global user.email "email@example.com" #+end_src - #+RESULTS: + These two steps are really important to commit. If you forget to do + so, you will get the following message: + #+BEGIN_CENTER + [[file:gitlab_images/commit3.png]] + #+END_CENTER 3. Confirm that you have set the Git username correctly: #+begin_src shell :results output :exports both @@ -91,6 +95,12 @@ git config --global http.proxy http://proxyUsername:proxyPassword@proxy.server.c The =proxyPassword= will be stored in plain text (unencrypted) in your ~.gitconfig~ file, which you may not want. In that case, remove it from the URL and you will be prompted for it every time it is needed. + +To stop using a proxy, simply use the following command: +#+begin_src shell :results output :exports both +git config --global --unset http.proxy +#+end_src + ** Getting your default password on GitLab (and possibly changing it) *Warning (Jupyter users) :* changing your default Gitlab password will prevent you from committing in Jupyter. You will have to do the extra @@ -160,6 +170,25 @@ git config credential.helper store Your password will be then stored in a =.git-credentials= file in plain text. On a perfectly secured machine, it may be fine... or not... ;) Use it at your own risk. + +To delete all the passwords that may have been stored, simply use the +following command: +#+begin_src shell :results output :exports both +git config --system --unset credential.helper +#+end_src + +Finally, those of you using Windows may get the following error +message: +#+BEGIN_EXAMPLE +git: 'credential-cache' is not a git command. See 'get --help'. +#+END_EXAMPLE +This issue is mentioned on [[https://stackoverflow.com/questions/11693074/git-credential-cache-is-not-a-git-command][stackoverflow]]. In such case, try the +following command: +#+begin_src shell :results output :exports both +git config --global --unset credential.helper +#+end_src +If the problem persists, do not hesitate to describe your problem on +the MOOC forum to get some help. ** Optional: authenticating through SSH There are two ways of authenticating and synchronizing your local repository with GitLab: through HTTPS or through SSH. The first one is diff --git a/module2/ressources/gitlab_fr.org b/module2/ressources/gitlab_fr.org index ff59a84..240c5cc 100644 --- a/module2/ressources/gitlab_fr.org +++ b/module2/ressources/gitlab_fr.org @@ -70,7 +70,12 @@ apt-get update ; apt-get install git git config --global user.email "email@example.com" #+end_src - #+RESULTS: + Ces deux paramètres sont obligatoire pour pouvoir commiter sinon + vous obtiendrez le message suivant: + + #+BEGIN_CENTER + [[file:gitlab_images/commit3.png]] + #+END_CENTER 3. Confirmer que vous avez correctement défini le nom d'utilisateur et l'email Git : @@ -97,6 +102,13 @@ Le =proxyPassword= sera stocké en texte brut (non crypté) dans votre fichier ~.gitconfig~, ce que vous ne souhaitez peut-être pas. Dans ce cas, supprimez-le de l'URL et vous serez invité à le saisir chaque fois que vous en aurez besoin. + +Pour effacer l'utilisation de ce proxy, il vous suffit d'utiliser cette +commande : +#+begin_src shell :results output :exports both +git config --global --unset http.proxy +#+end_src + ** Récupérer votre mot de passe par défaut sur GitLab (et le changer éventuellement) *Avertissement (utilisateurs Jupyter) :* changer votre mot de passe Gitlab par défaut vous empêchera de commiter les notebooks Jupyter que @@ -179,6 +191,25 @@ Votre mot de passe sera alors stocké dans un fichier =.git-credentials= en texte brut (non-crypté). Sur une machine parfaitement sécurisée, cela peut être très bien... ou pas... ;) Utilisez cette possibilité à vos risques et périls. + +Si vous souhaitez effacer les mots de passe enregistrés, il vous +suffit d'utiliser cette commande : +#+begin_src shell :results output :exports both +git config --system --unset credential.helper +#+end_src + +Enfin, il peut arriver que vous ayez le message d'erreur suivant sous +Windows: +#+BEGIN_EXAMPLE +git: 'credential-cache' is not a git command. See 'get --help'. +#+END_EXAMPLE +Ce problème est évoqué sur [[https://stackoverflow.com/questions/11693074/git-credential-cache-is-not-a-git-command][stackoverflow]]. Dans ce cas, tentez la +commande suivante : +#+begin_src shell :results output :exports both +git config --global --unset credential.helper +#+end_src +Si ça ne marche toujours pas, n'hésitez pas à décrire votre problème +sur le forum du MOOC. ** Optionnel : authentification par SSH Il existe deux manières d'authentifier et de synchroniser votre dépôt local avec GitLab : via HTTPS ou via SSH. Le premier est ce -- 2.18.1