Unverified Commit 7ba43d93 authored by Laurent Modolo's avatar Laurent Modolo
Browse files

fix typo and add img

parent cf3c1b9c
......@@ -19,7 +19,7 @@ latex_engine: xelatex
# Setup your environment
We are going to write some basic configuration files to be able to the [gitlab server of the LBMC](http://gitlab.biologie.ens-lyon.fr).
We are going to write some basic configuration files to be able to connect to the [gitlab server of the LBMC](http://gitlab.biologie.ens-lyon.fr).
If you are not using your own laptop, remember to delete your `~/.ssh` folder at the end of the TP.
Otherwise, somebody else could use your ssh key if you don’t protect them with a password.
But don’t stress too much about it, you can always remove the key later from your [gitlab configuration](http://gitlab.biologie.ens-lyon.fr/profile/keys).
......@@ -52,17 +52,17 @@ unstage = "reset HEAD"
You can replace `vim` by any other editor of your choice, like `nano` (easier to learn) or `gedit` (graphical).
The **alias** section of the configuration is for shortcuts of git commands.
`git checkout` is now equivalent to `git co` to minimize the number of keys pressed.
`git co` is now equivalent to `git checkout` but minimize the number of keys pressed.
## Gitlab connection
There are many ways to connect to a gitlab server.
Git relies on other system protocols to handle authentication and rights.
There are many ways to connect to a gitlab server (you are browsing one right now).
The git software relies on other system protocols to handle authentication and rights.
Here we are going to use two different methods depending on if you are using your laptop or a PSMN computer.
### https method (for the PSMN computers)
When you cannot modify the `~/.ssh/config` or set its right correctly, to use git over ssh you can use the https protocol instead of ssh.
When you cannot modify the `~/.ssh/config` or set its right correctly, you can use the https protocol instead of ssh.
As the gitlab server is not accessible outside of the ENS, you will have SSL certificate problem. We can safely ignore them in this TP with the git option `-c http.sslVerify=false`.
You can set this option globally with the command:
......@@ -78,7 +78,7 @@ Go to [https://gitlab.biologie.ens-lyon.fr/profile/password/edit](https://gitlab
To connect to the gitlab server via ssh, you first need to generate a ssh key:
```sh
ssh-keygen -t rsa -C "your.email@ens-lyon.fr" -b 4096 -f ~/.ssh/id_rsa_gitlab_lbmc
ssh-keygen -t rsa -C "<your_email>@ens-lyon.fr" -b 4096 -f ~/.ssh/id_rsa_gitlab_lbmc
```
When you are on a UNIX system and when you have the right to remove the writing permission to your `~/.ssh/config` for the group and the others, you can use this method.
......@@ -95,7 +95,7 @@ Host gitlab_lbmc
IdentityFile ~/.ssh/id_rsa_gitlab_lbmc
```
This configuration provides you with the shortcut `gitlab_lbmc` to connect yourself to the `gitlab.biologie.ens-lyon.fr` server on the port `2222` under the `git` user, without using a password and using the identity key ` ~/.ssh/id_rsa_gitlab_lbmc`.
This configuration provides you with the shortcut `gitlab_lbmc` to connect to the `gitlab.biologie.ens-lyon.fr` server on the port `2222` under the `git` user, without using a password and using the identity key ` ~/.ssh/id_rsa_gitlab_lbmc`.
Finally, go to [http://gitlab.biologie.ens-lyon.fr/profile/keys](http://gitlab.biologie.ens-lyon.fr/profile/keys) and paste the content of the file ``~/.ssh/id_rsa_gitlab_lbmc.pub`
......@@ -179,7 +179,7 @@ git st
There are now changes to be committed, this means that git is now following the state of the `data/letter.txt` file.
The current state of `data/letter.txt` is recorded.
![git add made a copy of the file creating the corresponding blob](img/staging_1.png){height=150px}
![git add made a copy of the file creating the corresponding blob](img/staging_1.png)
```sh
git ls-files --stage
......
Supports Markdown
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