Gitlab #

CIS IT Support manage a Gitlab instance which is available to staff and students in both CIS and the Faculty of Science.

Getting access #

You can login to Gitlab at https://gitlab.cis.strath.ac.uk.

If you would like a Gitlab account, please email cis-support@strath.ac.uk.

If you are not part of the Faculty of Science but need access to collaborate with Science users, please ask your Science partner or sponsor to email us on your behalf in order to request access.

Limitations #

Users are limited to 50 repositories by default. If need to create more than 50 repositories, please contact us with details of your use case and we'll consider your request.

There are no preset quotas however we expect most repositories to be under 1GB. If your repository is going to be over 1GB, we would appreciate it if you could let us know so that we can plan our server capacity accordingly.

If you expect to store more than 10GB, you must email us so that we can make sure that Gitlab is an appropriate solution (and, if so, capacity plan accordingly).

Gitlab is intended for source code collaborative development and should not be used to distribute datasets. If you need to distribute large datasets, you should consider using Microsoft 365 (OneDrive, Teams, SharePoint) or the I: drive. If in doubt, please contact us.

Gitlab repos are tied to your university user account and will be removed when your account expires (if you leave the university). If you need your code to continue to be available after your account expires, please contact us to request that we create a Gitlab group. You can then assign ownership of any repos to the group itself (rather than your user account) and give the group additional owners, who will be able to manage it in your absence.

Using Gitlab #

Authentication #

We recommend using SSH keys to access Gitlab - they're more secure and most cloud version control system platforms (like Gitlab.com and GitHub) are now phasing out password-based git access. You can manage your SSH keys on your account profile page.

For access to the web interface, you should setup two factor authentication (2FA). You can also do this from your account profile page. Gitlab supports both TOTP (rolling code) and WebAuthn (PassKey, FaceID, TouchID and YubiKey) for 2FA, and you can register multiple devices.

Password reset #

You can reset your password at the Gitlab password reset page.

Please keep in mind that your Gitlab password is independent of your university (DS) password. Your email address (login) will typically be your university email address.

Personal Access Tokens #

In order to use many third party tools and integrations (and to clone using git over HTTPS), you must create a Gitlab Personal Access Token. This is an API key that is used in place of your password when accessing Gitlab. It allows for fine-grained control over permissions and lets you set a token expiry time (to limit the impact if the token is ever compromised). While we generally recommend using git over SSH for day-to-day use, if you do need a Personal Access Token, you can create one from the Access Tokens settings page.

How do I make a Gitlab project public? #

Please talk to your lecturer/supervisor before making any class exercise solutions public.

Remember, you should apply a licensing statement to your code (see http://opensource.org/licenses for examples) and not publish any code you do not have a right to publish.

If you have ever committed passwords (or other sensitive information such as usernames, database server names, or personal data) to your repository you should NEVER make this repository public! Hackers frequently automatically scan public repositories for passwords and API keys, and will use the information to compromise other services. Remember that any sensitive information is also in the commit history of your project.

Having read the above warnings, if you still wish to make your project public then you can use the "Edit Project" option in the overflow menu from the project's web page. In the "Project Visibility" section in the main question select "Public" and then you need to save this change. Then in the same section you need to change "Repository" question to "Everyone with Access". You may also want to change "Build" and/or "Merge Requests" questions to "Everyone with Access" depending on your needs.

What happens to my Gitlab account when I leave? #

Your Gitlab account will be "blocked" at some point after you leave (normally within 90 days). All of your projects (and group projects) will still be there and working for other team members; if any were public then they will remain public.

This is not a guarantee that we will not, at a later date, delete your public projects as part of regular server maintenance, GDPR compliance or server cleanup so we strongly recommend that you pass projects along to a new owner prior to your departure.

How do I anonymously access Gitlab's public projects? #

You can go to the explore projects page or you can click on the Explore link at the bottom of the Sign In page. Of course, you need to ensure you are signed out first if you want to view the projects as an anonymous user (an incognito or private browsing tab will help with this).

How to use IntelliJ with Gitlab #

In order to use IntelliJ with Gitlab, you must create a Gitlab Personal Access Token. This is an API key that is used in place of your password when accessing Gitlab. It allows for fine-grained control over permissions and lets you set a token expiry time (to limit the impact if the token is ever compromised). You can create a Personal Access Token from the Access Tokens settings page.

Checking out an existing project from Gitlab to IntelliJ #

Git version control will now be enabled for this project

Enabling Git version control in a new IntelliJ project #

Checking in an IntelliJ project to Gitlab. #