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/07 17:38] – [MULTIPLE GIT ACCOUNTS] apano
Line 26: Line 26:
  
 ===== LOCAL GITLAB PROFILE ===== ===== LOCAL GITLAB PROFILE =====
 +
 +==== SINGLE GIT ACCOUNT ====
 You have to configure your locally installed gitlab to connect using the ssh key.  You have to configure your locally installed gitlab to connect using the ssh key. 
  
Line 41: Line 43:
 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 51:
 </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