This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
gitlab_notes [2022/03/25 15:25] – [Remote repo to local file system] lenocil | gitlab_notes [2022/08/09 12:02] (current) – [Gitlab Notes] lenocil | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Gitlab Notes ====== | ====== Gitlab Notes ====== | ||
+ | Lorentz Institute runs a private instance of Gitlab accessible to all institute members available at https:// | ||
- | Lorentz Institute runs a private instance of Gitlab accessible to all institute members at https:// | + | Accounts for external users can be requested via < |
- | You are strongly encouraged to use it to collaborate with your colleagues and fellow scientists anywhere in the world. Accounts for external users can be requested via < | + | Lorentz Institute members |
- | + | ||
- | Lorentz Institute members | + | |
{{:: | {{:: | ||
Line 11: | Line 10: | ||
===== SSH Keys and Personal Access Tokens ===== | ===== SSH Keys and Personal Access Tokens ===== | ||
- | Because access to the Institute Gitlab instance occurs via Single-Sign On((In other words it uses access and refresh tokens rather than usernames and passwords)) for all IL members, git //push// and //pull// operations must be performed either using __SSH key-pairs__ (SSH protocol) or using __Personal Access Tokens__ (HTTPS protocol). Failing to set up SSH key-pairs or Access Tokens will prevent IL members to interact via git with our Gitlab server. | + | Because access to the Institute Gitlab instance occurs via Single-Sign On((In other words it uses access and refresh tokens rather than usernames and passwords.)) for all IL members, git //push// and //pull// operations must be performed either using __SSH key-pairs__ (SSH protocol) or using __Personal Access Tokens__ (HTTPS protocol). Failing to set up SSH key-pairs or Access Tokens will prevent IL members to interact via git with our Gitlab server. |
- | In this case, the server | + | IL users that do not set up SSH key-pairs or Access Tokens |
{{ : | {{ : | ||
==== Generate an SSH key-pair and add it to Gitlab ==== | ==== Generate an SSH key-pair and add it to Gitlab ==== | ||
+ | On the workstation/ | ||
<code bash> | <code bash> | ||
- | ssh-keygen -t ed25519 -C " | + | ssh-keygen -t ed25519 -C " |
</ | </ | ||
- | The cmd above will generate the private/ | ||
- | Visit https:// | + | Visit https:// |
{{ : | {{ : | ||
- | Git over SSH is now enabled for your IL account. | + | You can non perform git operations |
+ | <code bash> | ||
+ | ssh -T git@gitlab.lorentz.leidenuniv.nl | ||
+ | Welcome to GitLab, @bongo1! | ||
+ | </ | ||
+ | |||
+ | |:!: NOTE| In some exceptional cases((Think of users with the same private email address or same username but different domain.)) | ||
==== Generate a Gitlab Personal Access Token ==== | ==== Generate a Gitlab Personal Access Token ==== | ||
- | Visit https:// | + | Visit https:// |
{{ : | {{ : | ||
- | Your personal access token will look something like '' | + | Your personal access token will look something like '' |
- | Your IL account is now enabled to perform git operations over HTTPS. | + | Your IL account is now enabled to perform git operations over //HTTPS//. |
- | ===== Gitlab 101 ===== | + | ===== Examples |
In the examples that follow it is shown how you can synchronise for the first time your local git repo to Gitlab and viceversa. The examples below assume you are typing all commands in a BASH GNU/Linux terminal and that you are familiar with the basics of git by reading carefully the following documents | In the examples that follow it is shown how you can synchronise for the first time your local git repo to Gitlab and viceversa. The examples below assume you are typing all commands in a BASH GNU/Linux terminal and that you are familiar with the basics of git by reading carefully the following documents | ||
Line 84: | Line 89: | ||
<code bash> | <code bash> | ||
- | git clone https:// | + | git clone https:// |
Cloning into ' | Cloning into ' | ||
- | Username for ' | + | Username for ' |
- | Password for ' | + | Password for ' |
remote: Enumerating objects: 3, done. | remote: Enumerating objects: 3, done. | ||
remote: Counting objects: 100% (3/3), done. | remote: Counting objects: 100% (3/3), done. |