Gitlab

From CT Wiki
(Difference between revisions)
Jump to: navigation, search
Line 43: Line 43:
 
===Inviting Users to Projects===
 
===Inviting Users to Projects===
  
If you are administrator of a project, you can invite users to participate. This can be done by accessing the Project Settings and selecting Members.
+
If you are maintainer of a project, you can invite users to participate. This can be done by accessing the Project Settings and selecting Members.
  
 
[[File: Invite.png]]
 
[[File: Invite.png]]
Line 63: Line 63:
 
This function is available when creating or editing a Group in Gitlab. You can create Groups under the '''Groups menu''' by choosing '''Your Groups''' and '''New Group''' in the next window. You will see the option to create a mattermost chat for this group all the way down like in this screenshot:
 
This function is available when creating or editing a Group in Gitlab. You can create Groups under the '''Groups menu''' by choosing '''Your Groups''' and '''New Group''' in the next window. You will see the option to create a mattermost chat for this group all the way down like in this screenshot:
  
 
+
[[File: Group.png]]
  
 
Opening the URL https://mattermost.nikhef.nl/login will then show the option '''Sign in with GitLab'''. Clicking on that button will open a gitlab login page which then hands over the user to Mattermost where they will automatically join the group chat.
 
Opening the URL https://mattermost.nikhef.nl/login will then show the option '''Sign in with GitLab'''. Clicking on that button will open a gitlab login page which then hands over the user to Mattermost where they will automatically join the group chat.

Revision as of 17:45, 26 March 2020

This page describes how to use the Nikhef gitlab service. It is not intended as a user guide for git, this would be beyond the scope of this page. We assume general familiarity with git. For reference, you can find a user guide here

Contents

Registering

To participate in a gitlab project open https://gitlab.nikhef.nl in your browser and go through the registration process. An account will automatically be created during registration and you can begin to work right away.

For Federated SSO Accounts

If you have a Nikhef account or an account which is part of the Federated Login SSO, then you can simply log in with your normal credentials by clicking Federated Login

Fedlogin.png

In the next screen, choose Nikhef IdP or find the correct one for your organisation.

As Nikhef user you will automatically be able to create your own projects and you can be invited by others to join theirs. Accounts from third parties will have to be invited to a project before they can contribute. They will not be able to start their own projects.

For Third-Party Accounts

Note to Nikhef staff who want to include external third parties: Your project contributors must have an email address with a unique domain. No gmail, hotmail, gmx, yahoo, or other general public mail providers! To invite external parties, use the email invite function described below.

In case you are not a member of Nikhef or any other organisation belonging to the Federated SSO, please contact your project liaison inside Nikhef and they will request the permission for you to register.

After you have received an invitation, use the Register tab to fill in your email address, username, and password.

You will then get a confirmation email which will take you through the sign-in process. Once you are logged in you can participate in any project you were invited to.


User Setup

You will find all relevant settings for your account in the menu which you can access by clicking on the icon on the very top right of the web-interface. Most settings are optional, but you will have to submit an SSH key make commits, clones, push and pull requests possible. To do so use the SSH Keys feature in your User Settings on the left side of the interface.

As you can see, there is a link to instructions on how to generate SSH keys and where to find them. Please follow the instructions there if you do not know how that works.

Sshkey.png


Inviting Users to Projects

If you are maintainer of a project, you can invite users to participate. This can be done by accessing the Project Settings and selecting Members.

Invite.png

If you click in the field Gitlab members or Email address you will get a drop-down menu of all users who are already registered. You can then choose a user to invite. Don't forget to set the appropriate privilege level for the user.

If you want to invite a user who does not have a gitlab account yet, enter their email address here and they will receive an invitation mail.

Before you invite a user, make sure they are either part of the Federated Login SSO or that their domain has been whitelisted for registration.

To request whitelisting of a domain, please contact the Nikhef helpdesk for assistance (e-mail: helpdesk-at-nikhef.nl / phone ext. 2200 / Room: H122)


Mattermost Groupchat Integration

Creating Mattermost Chats

This function is available when creating or editing a Group in Gitlab. You can create Groups under the Groups menu by choosing Your Groups and New Group in the next window. You will see the option to create a mattermost chat for this group all the way down like in this screenshot:

Group.png

Opening the URL https://mattermost.nikhef.nl/login will then show the option Sign in with GitLab. Clicking on that button will open a gitlab login page which then hands over the user to Mattermost where they will automatically join the group chat.

Activating GitLab Notifications in Mattermost

It is possible to send notifications from GitLab Projects to any Mattermost chat channel. Sign in to Mattermost and complete the following steps to do so:

  1. From the channel menu in Mattermost choose Integrations and then Incoming Webhooks
  2. Fill in the fields according to your preferences and click Save
  3. Copy the URL on the Setup Successful page and click on Done

Now sign in to GitLab and continue as follows:

  1. Open the project for which you want to include notifications
  2. Open Settings --> Integrations and scroll down the list until you find "Mattermost notifications"
  3. Click the Active checkbox and then choose all Trigger options according to your wishes.
  4. Scroll down until you find the field Webhook Paste the URL you obtained from step 3 on the Mattermost server into this field.
  5. Finish with Test settings and save. You will now receive all chosen notifications from your project in the Mattermost chat channel.
Views
Personal tools