Commit 561d52ac authored by Arnaud Legrand's avatar Arnaud Legrand

Move some of Marie-Gabrielle's documention in our own documentation

parent d81a02c3
...@@ -67,7 +67,11 @@ apt-get update ; apt-get install git ...@@ -67,7 +67,11 @@ apt-get update ; apt-get install git
git config --global user.email "email@example.com" git config --global user.email "email@example.com"
#+end_src #+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: 3. Confirm that you have set the Git username correctly:
#+begin_src shell :results output :exports both #+begin_src shell :results output :exports both
...@@ -91,6 +95,12 @@ git config --global http.proxy http://proxyUsername:proxyPassword@proxy.server.c ...@@ -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, 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 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. 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) ** Getting your default password on GitLab (and possibly changing it)
*Warning (Jupyter users) :* changing your default Gitlab password will *Warning (Jupyter users) :* changing your default Gitlab password will
prevent you from committing in Jupyter. You will have to do the extra prevent you from committing in Jupyter. You will have to do the extra
...@@ -160,6 +170,25 @@ git config credential.helper store ...@@ -160,6 +170,25 @@ git config credential.helper store
Your password will be then stored in a =.git-credentials= file in plain 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... ;) text. On a perfectly secured machine, it may be fine... or not... ;)
Use it at your own risk. 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 ** Optional: authenticating through SSH
There are two ways of authenticating and synchronizing your local There are two ways of authenticating and synchronizing your local
repository with GitLab: through HTTPS or through SSH. The first one is repository with GitLab: through HTTPS or through SSH. The first one is
......
...@@ -70,7 +70,12 @@ apt-get update ; apt-get install git ...@@ -70,7 +70,12 @@ apt-get update ; apt-get install git
git config --global user.email "email@example.com" git config --global user.email "email@example.com"
#+end_src #+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 3. Confirmer que vous avez correctement défini le nom d'utilisateur et
l'email Git : l'email Git :
...@@ -97,6 +102,13 @@ Le =proxyPassword= sera stocké en texte brut (non crypté) dans votre ...@@ -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 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 cas, supprimez-le de l'URL et vous serez invité à le saisir chaque fois
que vous en aurez besoin. 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) ** Récupérer votre mot de passe par défaut sur GitLab (et le changer éventuellement)
*Avertissement (utilisateurs Jupyter) :* changer votre mot de passe *Avertissement (utilisateurs Jupyter) :* changer votre mot de passe
Gitlab par défaut vous empêchera de commiter les notebooks Jupyter que 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= ...@@ -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, en texte brut (non-crypté). Sur une machine parfaitement sécurisée,
cela peut être très bien... ou pas... ;) Utilisez cette possibilité à cela peut être très bien... ou pas... ;) Utilisez cette possibilité à
vos risques et périls. 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 ** Optionnel : authentification par SSH
Il existe deux manières d'authentifier et de synchroniser votre 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 dépôt local avec GitLab : via HTTPS ou via SSH. Le premier est ce
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment