auth:gitlab
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
auth:gitlab [2016/08/31 09:27] – ↷ Page moved from public:gitlab to auth:gitlab kohofer | auth:gitlab [2021/07/05 18:09] (current) – kohofer | ||
---|---|---|---|
Line 5: | Line 5: | ||
UNIBZ users have to login to [[https:// | UNIBZ users have to login to [[https:// | ||
- | External users can sign up with their Google, Twitter, or Facebook account. The external user has to motivate the request by sending an e-mail to cs-tech@lists.inf.unibz.it. | + | External users can sign up with their Google, Twitter, or Facebook account. |
Here are some instructions on GitLab to ease its use. | Here are some instructions on GitLab to ease its use. | ||
Line 12: | Line 12: | ||
===== Initial setup ===== | ===== Initial setup ===== | ||
- | Depending on the operating system, hereby our suggestions: | + | Git is usually preinstalled in Linux and Mac, while in Windows you have to [[https://git-scm.com/ |
- | * Terminal on MacOSX | + | |
- | * [[https://msysgit.github.io | + | |
- | * Terminal on Linux | + | |
- | Git is usually preinstalled in Linux and Mac, check the version < | + | You can have different hosts for different |
- | git --version< | + | |
- | You have to instruct Git to use a specific username/ | + | The steps for pushing and pulling via SSH Key |
- | To check if you have any configurations saved: < | + | |
- | If your global configuration is empty then you can create a global configuration, unless create a local configuration for the repository you need. | + | * Step 1: [[auth:gitlab# |
- | ==== Global | + | * Step 2: [[auth: |
- | LINUX/ | + | * Step 3: [[auth: |
+ | |||
+ | ===== Identify or create the SSH key ===== | ||
+ | If you need support on how to generate the SSH key follow our guide on [[auth: | ||
+ | |||
+ | ===== Add an SSH key ===== | ||
+ | If you already | ||
+ | Once you click Add Key, you will see the it listed. | ||
+ | |||
+ | ===== Configure your local Git Client ===== | ||
+ | |||
+ | Before proceeding | ||
+ | LINUX/ | ||
+ | |||
+ | If you use only one server for Git repositories configure it globally, otherwise locally. | ||
+ | |||
+ | ==== Global | ||
+ | To configure GIT globally using the SSH key Inside | ||
< | < | ||
git config --global user.name " | git config --global user.name " | ||
Line 31: | Line 44: | ||
</ | </ | ||
- | The last command should show the data you entered and is your gitlab global configuration. | + | This data is stored |
- | This data is saved in the file ~/ | + | Linux/ |
+ | Windows: C: | ||
+ | The content should be: | ||
<code txt> | <code txt> | ||
[user] | [user] | ||
Line 40: | Line 55: | ||
</ | </ | ||
- | Try to checkout repo. Should you experience trouble check the contents of file: .ssh/config. You can manually insert: | + | Add your server data and insert this data in your ssh configuration file. |
+ | |||
+ | Linux/ | ||
< | < | ||
host gitlab.inf.unibz.it | host gitlab.inf.unibz.it | ||
user your_username | user your_username | ||
+ | </ | ||
+ | |||
+ | Windows file ~/ | ||
+ | < | ||
+ | Host gitlab.inf.unibz.it | ||
+ | RSAAuthentication yes | ||
+ | IdentityFile ~/ | ||
</ | </ | ||
==== Local Configuration ==== | ==== Local Configuration ==== | ||
- | You have to do it in the root of the repository | + | You have to run the commands inside |
<code txt> | <code txt> | ||
Line 57: | Line 81: | ||
Should you receive this message | Should you receive this message | ||
git init | git init | ||
- | </ | + | </ |
- | ==== Add an SSH key ==== | + | |
- | If you need support on how to generate the SSH key follow our guide on [[auth: | + | |
- | If you already have an SSH key login to GitLab and go to → Profile Settings → SSH Keys. In the field Key copy the contents of the file: id_rsa.pub (or any other file containing your key). | + | ===== Basic Git ===== |
- | Once you click Add Key, you will see the key listed in your SSH Keys. | + | |
- | ===== Basic Git commands | + | |
The logic of git requires you to checkout a project via CLONE. You ensure the project files are up to date by issuing a PULL command. Once the modifications on the project are done, you ADD the changes, you COMMIT them and you PUSH them to the gitlab server. | The logic of git requires you to checkout a project via CLONE. You ensure the project files are up to date by issuing a PULL command. Once the modifications on the project are done, you ADD the changes, you COMMIT them and you PUSH them to the gitlab server. | ||
Line 164: | Line 184: | ||
+ | ===== Some support cases ===== | ||
+ | SourceTree failing to connect | ||
+ | * Delete entry in keychain for gitlab.inf.unibz.it | ||
+ | * Add key again to ssh client : ssh-add -K < | ||
+ | |||
+ | ===== Renew the SSL certificates - gitlab.inf.unibz.it ===== | ||
+ | |||
+ | Certificate is valid for 3 months | ||
+ | |||
+ | A cronjob renews the certificate every 1st day of the month | ||
+ | |||
+ | root@gitlab: | ||
+ | |||
+ | < | ||
+ | # At 04:05 on day-of-month 1. | ||
+ | 5 4 1 * * / | ||
+ | # At 04:10 on day-of-month 1. | ||
+ | 10 4 1 * * / | ||
+ | </ | ||
/data/www/wiki.inf.unibz.it/data/attic/auth/gitlab.1472628424.txt.gz · Last modified: 2019/01/16 10:03 (external edit)