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/06/07 17:21] apanoauth:howto:sshkeygitlab [2016/06/15 10:47] – [SINGLE GIT ACCOUNT] apano
Line 26: Line 26:
  
 ===== LOCAL GITLAB PROFILE ===== ===== LOCAL GITLAB PROFILE =====
-You have to configure your locally installed gitlab to connect using the ssh key.  
  
-LINUX/MACOSX Inside a terminal, type the following: +==== SINGLE GIT ACCOUNT ==== 
 +You have to configure your locally installed gitlab client to connect using the ssh key.  
 + 
 +LINUX/MACOSX 
 + 
 +Inside a terminal, type the following:  
 + 
 +<code>
 git config --global user.name "Firstname Lastname" git config --global user.name "Firstname Lastname"
 git config --global user.email "your_email@unibz.it" git config --global user.email "your_email@unibz.it"
 git config --list git config --list
 +</code>
  
 WINDOWS WINDOWS
 +
 Inside your GIT bash command line, type the following:  Inside your GIT bash command line, type the following: 
 +
 +<code>
 git config --global user.name "Firstname Lastname" git config --global user.name "Firstname Lastname"
 git config --global user.email "your_email@unibz.it" git config --global user.email "your_email@unibz.it"
 git config --list git config --list
 +</code>
  
 The last command should show the data you entered and is your gitlab global configuration.  The last command should show the data you entered and is your gitlab global configuration. 
  
-You have to edit your gitlab configuration to reflect the URL and the username/email to use when connecting. To do so  +This data is saved in the file ~/.gitconfig: 
- +
-1. edit the file ~/.gitconfig and insert your data+
  
 <code txt> <code txt>
Line 51: Line 60:
 </code> </code>
  
-2edit .ssh/config +Try to checkout repoShould you experience trouble check the contents of file: .ssh/config. You can manually insert: 
-<code txt>+
 host gitlabhostname.unibz.it host gitlabhostname.unibz.it
-        user your_username+ 
 + 
 +         
 +==== MULTIPLE GIT ACCOUNTS ==== 
 +You can also have different gitlab accounts (with different RSA keys) for different hosts. You can keep a global user/email configuration and a local configuration for a specific repository. In the root of a repository, run: 
 + 
 +<code txt> 
 +git config user.name "Firstname Lastname" 
 +git config user.email "your_other@email"
 </code> </code>
 +
  
/data/www/wiki.inf.unibz.it/data/pages/auth/howto/sshkeygitlab.txt · Last modified: 2019/12/03 14:18 by apano