This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
gitlab_notes [2022/03/28 08:06] – [SSH Keys and Personal Access Tokens] 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:// | ||
- | |IMPORTANT\\ :!:|Gitlab logins | + | Accounts for external users can be requested |
- | Lorentz Institute | + | Lorentz Institute members |
- | + | ||
- | 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 **must use** the button | + | |
{{:: | {{:: | ||
Line 13: | 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. |
IL users that do not set up SSH key-pairs or Access Tokens will likely receive upon login a warning message like the one in the figure below | IL users that do not set up SSH key-pairs or Access Tokens will likely receive upon login a warning message like the one in the figure below | ||
Line 20: | Line 17: | ||
==== 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//. |
===== Examples ===== | ===== Examples ===== | ||
Line 86: | 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. |