auth:howto:sshkeygitlab
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
auth:howto:sshkeygitlab [2016/06/07 17:21] – apano | auth:howto:sshkeygitlab [2016/07/07 11:27] – [MULTIPLE GIT ACCOUNTS] 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/ | + | ==== GLOBAL GIT ACCOUNT ==== |
- | git config --global user.name " | + | You have to configure your locally installed gitlab client to connect using the ssh key. |
- | git config --global user.email " | + | |
- | git config --list | + | |
- | WINDOWS | + | Inside |
- | Inside | + | |
+ | < | ||
git config --global user.name " | git config --global user.name " | ||
git config --global user.email " | git config --global user.email " | ||
git config --list | git config --list | ||
+ | </ | ||
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/ | + | This data is saved in the file ~/ |
- | + | ||
- | 1. edit the file ~/ | + | |
<code txt> | <code txt> | ||
Line 51: | Line 48: | ||
</ | </ | ||
- | 2. edit .ssh/ | + | Try to checkout repo. Should you experience trouble check the contents of file: .ssh/config. You can manually insert: |
- | < | + | < |
host gitlabhostname.unibz.it | host gitlabhostname.unibz.it | ||
- | user your_username | ||
</ | </ | ||
+ | |||
+ | |||
+ | | ||
+ | ==== LOCAL GIT ACCOUNT ==== | ||
+ | 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 " | ||
+ | git config user.email " | ||
+ | </ | ||
+ | |||
/data/www/wiki.inf.unibz.it/data/pages/auth/howto/sshkeygitlab.txt · Last modified: 2019/12/03 14:18 by apano