User Tools

Site Tools


auth:howto:sshkeygitlab

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
auth:howto:sshkeygitlab [2016/07/07 11:27] – [MULTIPLE GIT ACCOUNTS] apanoauth:howto:sshkeygitlab [2017/06/13 12:52] – [GET/SET SSH KEY] apano
Line 4: Line 4:
 ===== GET/SET SSH KEY ===== ===== GET/SET SSH KEY =====
  
-You need an SSH key that resides on your workstation/notebook. You can use an already existing certificate or generate a new one. +You need an SSH key that resides on your workstation/notebook. You can use an already existing key or generate a new one. 
  
 To check if you already have an SSH certificate that you have to check the file:  To check if you already have an SSH certificate that you have to check the file: 
Line 10: Line 10:
 WINDOWS <code>%userprofile%\.ssh\id_rsa.pub</code> WINDOWS <code>%userprofile%\.ssh\id_rsa.pub</code>
  
-If this file contains an SSH-RSA key, you can proceed to step 2.+If this file contains an SSH-RSA key, proceed to [[https://wiki.inf.unibz.it/auth/howto/sshkeygitlab#configure_gitlab_online| Configure the SSH key on gitlab.inf.unibz.it]].
 If this file is empty or does not exist, it means that the key was never generated.  If this file is empty or does not exist, it means that the key was never generated. 
  
 To generate the key you can use a key generator such as [[http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html|PuTTYgen]], or command line.  To generate the key you can use a key generator such as [[http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html|PuTTYgen]], or command line. 
 To generate the key via command line use the command: To generate the key via command line use the command:
-<code>ssh-keygen -t rsa -C "your_email@unibz.it"</code>+<code>ssh-keygen -t rsa -C "your_email@unibz.it" -b 4096</code>
 To generate the key via PuTTygen follow the guidelines of the product.  To generate the key via PuTTygen follow the guidelines of the product. 
 +<note important>Windows GitBash your rsa-key file must be called id_rsa. Create it if it does not exist and add the generated rsa key there </note>
  
-Remember that you can also use another name for the file name. You can call the file gitlab_rsa if you prefer or anything else. +Remember that you can also use another name for the file name. You can call the file gitlab.inf_rsa if you prefer or anything else.  
 +[[https://docs.gitlab.com/ee/ssh/README.html|GitLab Official Documentation]]
  
 ===== CONFIGURE GITLAB ONLINE ===== ===== CONFIGURE GITLAB ONLINE =====
-Login to GitLab and go to -> Profile Settings -> SSH Keys. In the field Key copy the contents of the file: id_rsa.pub generated in step 1.  +Login to GitLab and go to -> Profile Settings -> SSH Keys.
-Once you click Add Key, you will see the key listed in your SSH Keys. +
  
  
-===== LOCAL GITLAB PROFILE =====+In the field Key copy all the contents of the file: id_rsa.pub (or the specific name of your RSA key)  
 +Click Add Key.  
 + 
 +The key is listed in your SSH Keys.  
 + 
 +[[https://docs.gitlab.com/ee/gitlab-basics/create-your-ssh-keys.html|Official Gitlab Documentation]] 
 +===== GITLAB CLIENT CONFIGURATION =====
  
 ==== GLOBAL GIT ACCOUNT ==== ==== GLOBAL GIT ACCOUNT ====
/data/www/wiki.inf.unibz.it/data/pages/auth/howto/sshkeygitlab.txt · Last modified: 2019/12/03 14:18 by apano