Skip to content

2. GitLab Setup

Summary

Each students has a personal site hosted by html//:FabLab.org. The objective of this week was to get this site, and all of the associated programs set up and configured to enable development throughout the course. This is critical because all FabLab work, assignments, learning and progress will be documented though the stuent sites. Below you will find terminal commands and instructions for setup as well and some helpfull information regarding editing and site development.

Also see

  • Development Notes - this page will include code and web development tips that I will use continuously thorughout the program. They will be added here to provide a singe point of referance rather than notes separated by week.

  • Important Links - this page includes useful links that will be used continuously thorughout the course.

Contents * Terminal commands for GitLab instalation * Terminal commands for Connecting Git to the a local IP adress * Terminal commands for instalantion of MKdocs * Terminal commands for download of a template Mkdocs website template into the GitLab Repo

Process for connecting to GitLab

Generate SSH Keys 1. Check if you have an SSH KEY already (If you see a long string starting with ssh-rsa, you can skip the ssh-keygen step): cat ~/.ssh/id_rsa.pub

  1. Generate your SSH key: ssh-keygen -t rsa -C "your_email@mail.com"

  2. See your keygen cat ~/.ssh/id_rsa.pub

  3. Copy your key:pbcopy < ~/.ssh/id_rsa.pub

  4. Add your key to your GitLab account

    • Sign in to GitLab.
    • In the upper-right corner, select your avatar.
    • Select Edit profile.
    • On the left sidebar, select SSH Keys.
    • Select Add new key.
    • In the Key box, paste the contents of your public key. If you manually copied the key, make sure you copy the entire key, which starts with ssh-rsa, ssh-dss, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, ssh-ed25519, sk-ecdsa-sha2-nistp256@openssh.com, or sk-ssh-ed25519@openssh.com, and may end with a comment.
    • In the Title box, type a description, like Work Laptop or Home Workstation.
    • Select Add key.

Terminal view of connecting to GetLab

Generate a key to identify your device (base) yarathomas@Yaras-MacBook-Air ~ % ssh-keygen

Generating public/private ed25519 key pair.
Enter file in which to save the key (/Users/yarathomas/.ssh/id_ed25519): 
Created directory '/Users/yarathomas/.ssh'.
Enter passphrase for "/Users/yarathomas/.ssh/id_ed25519" (empty for no passphrase): 

No passphrase so return twice

Enter same passphrase again: 
Your identification has been saved in /Users/yarathomas/.ssh/id_ed25519
Your public key has been saved in /Users/yarathomas/.ssh/id_ed25519.pub
The key fingerprint is:
SHA256:ImU8G14xWeZOBLeBdnRq6gkOykC/SxvSLR8V5hqnlds yarathomas@Yaras-MacBook-Air.local
The key's randomart image is:
+--[ED25519 256]--+
|        +*B .    |
|     .  +B.=     |
| .    *+..*      |
|. .  +o=o=       |
|.  .o.=*S .      |
| o..o+B+o.       |
| .o* =..oE       |
|  o * .          |
|   o .           |
+----[SHA256]-----+

Show existing SSH Keys (base) yarathomas@Yaras-MacBook-Air ~ % ls-la.ssh

zsh: command not found: ls-la.ssh

Correction - proper spacing

(base) yarathomas@Yaras-MacBook-Air ~ % **ls -la .ssh**
total 16
drwx------   4 yarathomas  staff   128 Jan 22 11:55 .
drwxr-x---+ 47 yarathomas  staff  1504 Jan 22 11:55 ..
-rw-------   1 yarathomas  staff   432 Jan 22 11:55 id_ed25519
-rw-r--r--   1 yarathomas  staff   116 Jan 22 11:55 id_ed25519.pub

Display full key (base) yarathomas@Yaras-MacBook-Air ~ % cat .ssh/id_ed25519.pub

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPuMFR2gwzZvPnFuoQ76li9vqrkVxaWxXCBKTPePg3D 

Go to : Sign in to GitLab. In the upper-right corner, select your avatar. Select Edit profile. On the left sidebar, select SSH Keys. Select Add new key. (copy and paste key to GitLab)

Back in the terminal - Clone repositiory yarathomas@Yaras-MacBook-Air.local (base) yarathomas@Yaras-MacBook-Air ~ % git clone git@gitlab.fabcloud.org:academany/fabacademy/2026/labs/barcelona/students/yara-thomas.git

Cloning into 'yara-thomas'...
The authenticity of host 'gitlab.fabcloud.org (13.59.248.79)' can't be established.
ED25519 key fingerprint is SHA256:JCWnquB9CdnH4ctlmBh6JGzw02iMui8j8KckmYNCq/M.
This key is not known by any other names.

Confirm connection
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'gitlab.fabcloud.org' (ED25519) to the list of known hosts.
remote: Enumerating objects: 28, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 28 (delta 4), reused 0 (delta 0), pack-reused 19 (from 1)
Receiving objects: 100% (28/28), 29.95 KiB | 4.28 MiB/s, done.
Resolving deltas: 100% (9/9), done.
(base) yarathomas@Yaras-MacBook-Air ~ % git push
fatal: not a git repository (or any of the parent directories): .git
(base) yarathomas@Yaras-MacBook-Air ~ % 

Setting up an mkdocs-material site

All commands in this section must be input at a zsh terminal, either macOS’s Terminal, or a Linux terminal. If you are on Windows, make sure to install Ubuntu on WSL first.

  1. Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh

Setting up a template in MKdocs

Process for copying the fabacademy mkdocs-template

  1. Go inside your local repo folder and erase everything with git: git rm *

  2. Go to the template’s repo and download the code as a zip file.

    • Extract the content of the zip file into your local repo folder.
  3. Add all of this: git add .

  4. Commit: git commit -m "Migrate to mkdocs"

    • Push: git push

    • Your site should build automatically thanks to gitlab CI. You can check this in the pipelines section of the repo’s page in gitlab.

  5. In order to see preview the effect of changes before uploading, run mkdocs locally: Init a uv project in the folder: uv init

  6. Install the Python packages required to build your site: uv add -r requirements.txt

  7. Run mkdocs, listening to local changes and rebuilding as appropriate: uv run mkdocs serve --livereload

Terminal view for copying MKdocs template

Check Git Satus (base) yarathomas@Yaras-MacBook-Air IACC_Repo % git status

On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
    modified:   public/assignments/user_agreement.html

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    .DS_Store

no changes added to commit (use "git add" and/or "git commit -a")
(base) yarathomas@Yaras-MacBook-Air IACC_Repo % git commit -m""
error: switch `m' requires a value
(base) yarathomas@Yaras-MacBook-Air IACC_Repo % git commit
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
    modified:   public/assignments/user_agreement.html

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    .DS_Store
no changes added to commit (use "git add" and/or "git commit -a")

(base) yarathomas@Yaras-MacBook-Air IACC_Repo % **git rm ***

fatal: not removing 'public' recursively without -r

(base) yarathomas@Yaras-MacBook-Air IACC_Repo % git rm -r

fatal: No pathspec was given. Which files should I remove?

Remove all files except hidden git files that contain the info connecting local IP to git Lab (base) yarathomas@Yaras-MacBook-Air IACC_Repo % **git rm -r ***

error: the following file has local modifications:
    public/assignments/user_agreement.html
(use --cached to keep the file, or -f to force removal)

Check Git atus (base) yarathomas@Yaras-MacBook-Air IACC_Repo % git status

On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
    modified:   public/assignments/user_agreement.html

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    .DS_Store

no changes added to commit (use "git add" and/or "git commit -a")

(base) yarathomas@Yaras-MacBook-Air IACC_Repo % ls

README.md   public

(base) yarathomas@Yaras-MacBook-Air IACC_Repo % **git rm -r ***

error: the following file has local modifications:
    public/assignments/user_agreement.html
(use --cached to keep the file, or -f to force removal)

(base) yarathomas@Yaras-MacBook-Air IACC_Repo % git rm -fr *

rm 'README.md'
rm 'public/404.html'
rm 'public/about.html'
rm 'public/assignments/user_agreement.html'
rm 'public/assignments/week01.html'
rm 'public/assignments/week02.html'
rm 'public/final-project.html'
rm 'public/images/avatar-photo.jpg'
rm 'public/images/sample-photo.jpg'
rm 'public/index.html'
rm 'public/style.css'

(base) yarathomas@Yaras-MacBook-Air IACC_Repo % git status

On branch main
Your branch is up to date with 'origin/main'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
    deleted:    README.md
    deleted:    public/404.html
    deleted:    public/about.html
    deleted:    public/assignments/user_agreement.html
    deleted:    public/assignments/week01.html
    deleted:    public/assignments/week02.html
    deleted:    public/final-project.html
    deleted:    public/images/avatar-photo.jpg
    deleted:    public/images/sample-photo.jpg
    deleted:    public/index.html
    deleted:    public/style.css

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
    modified:   .gitlab-ci.yml

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    .gitignore
    README.md
    docs/
    mkdocs.yml
    requirements.txt

(base) yarathomas@Yaras-MacBook-Air IACC_Repo % git add . (base) yarathomas@Yaras-MacBook-Air IACC_Repo % git commit -m “Migrate to mkdocs”

[main f79005d] Migrate to mkdocs
 46 files changed, 1546 insertions(+), 513 deletions(-)
 create mode 100644 .gitignore
 create mode 100644 docs/about/agreement.md
 create mode 100644 docs/about/index.md
 create mode 100644 docs/assignments/week01.md
 create mode 100644 docs/assignments/week02.md
 create mode 100644 docs/assignments/week03.md
 create mode 100644 docs/assignments/week04.md
 create mode 100644 docs/assignments/week05.md
 create mode 100644 docs/assignments/week06.md
 create mode 100644 docs/assignments/week07.md
 create mode 100644 docs/assignments/week08.md
 create mode 100644 docs/assignments/week09.md
 create mode 100644 docs/assignments/week10.md
 create mode 100644 docs/assignments/week11.md
 create mode 100644 docs/assignments/week12.md
 create mode 100644 docs/assignments/week13.md
 create mode 100644 docs/assignments/week14.md
 create mode 100644 docs/assignments/week15.md
 create mode 100644 docs/assignments/week16.md
 create mode 100644 docs/assignments/week17.md
 create mode 100644 docs/assignments/week18.md
 create mode 100644 docs/assignments/week19.md
 create mode 100644 docs/assignments/week20.md
 create mode 100644 docs/files/.gitkeep
 create mode 100644 docs/images/avatar-photo.jpg
 create mode 100644 docs/images/favicon.svg
 create mode 100644 docs/images/sample-photo.jpg
 create mode 100644 docs/images/sample-pic-2.jpeg
 create mode 100644 docs/images/week01/assignment-photo.jpg
 create mode 100644 docs/index.md
 create mode 100644 docs/projects/final-project.md
 create mode 100644 docs/projects/sample-project.md
 create mode 100644 mkdocs.yml
 delete mode 100644 public/404.html
 delete mode 100644 public/about.html
 delete mode 100644 public/assignments/user_agreement.html
 delete mode 100644 public/assignments/week01.html
 delete mode 100644 public/assignments/week02.html
 delete mode 100644 public/final-project.html
 delete mode 100644 public/images/avatar-photo.jpg
 delete mode 100644 public/images/sample-photo.jpg
 delete mode 100644 public/index.html
 delete mode 100644 public/style.css
 create mode 100644 requirements.txt

(base) yarathomas@Yaras-MacBook-Air IACC_Repo % git push

Enumerating objects: 47, done.
Counting objects: 100% (47/47), done.
Delta compression using up to 8 threads
Compressing objects: 100% (40/40), done.
Writing objects: 100% (44/44), 208.73 KiB | 23.19 MiB/s, done.
Total 44 (delta 21), reused 0 (delta 0), pack-reused 0
To gitlab.fabcloud.org:academany/fabacademy/2026/labs/barcelona/students/yara-thomas.git
   64d2a50..f79005d  main -> main

(base) yarathomas@Yaras-MacBook-Air IACC_Repo % uv init

Initialized project `iacc-repo`
(base) yarathomas@Yaras-MacBook-Air IACC_Repo % uv add -r requirements.txt
Using CPython 3.12.7 interpreter at: /opt/anaconda3/bin/python3
Creating virtual environment at: .venv
Resolved 34 packages in 5.94s
Prepared 33 packages in 42.95s
Installed 33 packages in 284ms
 + babel==2.17.0
 + backrefs==6.1
 + certifi==2026.1.4
 + charset-normalizer==3.4.4
 + click==8.3.1
 + colorama==0.4.6
 + ghp-import==2.1.0
 + gitdb==4.0.12
 + gitpython==3.1.46
 + idna==3.11
 + jinja2==3.1.6
 + markdown==3.10.1
 + markupsafe==3.0.3
 + mergedeep==1.3.4
 + mkdocs==1.6.1
 + mkdocs-get-deps==0.2.0
 + mkdocs-git-revision-date-localized-plugin==1.1.0
 + mkdocs-material==9.7.1
 + mkdocs-material-extensions==1.3.1
 + packaging==26.0
 + paginate==0.5.7
 + pathspec==1.0.3
 + platformdirs==4.5.1
 + pygments==2.19.2
 + pymdown-extensions==10.20
 + python-dateutil==2.9.0.post0
 + pyyaml==6.0.3
 + pyyaml-env-tag==1.1
 + requests==2.32.5
 + six==1.17.0
 + smmap==5.0.2
 + urllib3==2.6.3
 + watchdog==6.0.0

Intiate the connection between MKdocs files and GitLab (base) yarathomas@Yaras-MacBook-Air IACC_Repo % uv run mkdocs serve –livereload

INFO    -  Building documentation...
INFO    -  Cleaning site directory
INFO    -  Documentation built in 0.69 seconds
INFO    -  [11:02:59] Watching paths for changes: 'docs', 'mkdocs.yml'
INFO    -  [11:02:59] Serving on
           http://127.0.0.1:8000/fabacademy-student-template/
WARNING -  [11:06:59] "GET / HTTP/1.1" code 302
INFO    -  [11:07:00] Browser connected:
           http://localhost:8000/fabacademy-student-template/
INFO    -  [11:07:39] Detected file changes
INFO    -  Building documentation...
INFO    -  Documentation built in 0.73 seconds
INFO    -  [11:07:40] Reloading browsers
INFO    -  [11:07:40] Browser connected:
           http://localhost:8000/fabacademy-student-template/
INFO    -  [11:07:48] Detected file changes
INFO    -  Building documentation...
INFO    -  Documentation built in 0.66 seconds
INFO    -  [11:07:49] Reloading browsers
INFO    -  [11:07:49] Browser connected:
           http://localhost:8000/fabacademy-student-template/
INFO    -  [11:08:27] Detected file changes
INFO    -  Building documentation...
INFO    -  [11:08:28] Reloading browsers
INFO    -  [11:08:28] Browser connected:
           http://localhost:8000/fabacademy-student-template/
INFO    -  [11:08:34] Detected file changes
INFO    -  Building documentation...
INFO    -  Documentation built in 0.63 seconds
INFO    -  [11:08:35] Reloading browsers
INFO    -  [11:08:35] Browser connected:
           http://localhost:8000/fabacademy-student-template/
INFO    -  [11:12:16] Detected file changes
INFO    -  Building documentation...
INFO    -  Documentation built in 0.72 seconds
INFO    -  [11:12:17] Reloading browsers
INFO    -  [11:12:18] Browser connected:
           http://localhost:8000/fabacademy-student-template/assignments/week01/
INFO    -  [11:12:23] Browser connected:
           http://localhost:8000/fabacademy-student-template/assignments/week01/
INFO    -  [11:13:23] Browser connected:
           http://localhost:8000/fabacademy-student-template/assignments/week02/
INFO    -  [11:14:04] Browser connected:
           http://localhost:8000/fabacademy-student-template/assignments/week02/
INFO    -  [11:15:04] Browser connected:
           http://localhost:8000/fabacademy-student-template/assignments/week03/
INFO    -  [11:15:27] Detected file changes
INFO    -  Building documentation...
INFO    -  Documentation built in 0.71 seconds
INFO    -  [11:15:28] Reloading browsers
INFO    -  [11:15:29] Browser connected:
           http://localhost:8000/fabacademy-student-template/assignments/week03/
INFO    -  [11:15:32] Browser connected:
           http://localhost:8000/fabacademy-student-template/assignments/week03/
INFO    -  [11:15:52] Browser connected:
           http://localhost:8000/fabacademy-student-template/assignments/week03/
INFO    -  [11:16:03] Detected file changes
INFO    -  Building documentation...
INFO    -  Documentation built in 0.67 seconds
INFO    -  [11:16:04] Reloading browsers
INFO    -  [11:16:05] Browser connected:
           http://localhost:8000/fabacademy-student-template/assignments/week03/
INFO    -  [11:21:05] Browser connected:
           http://localhost:8000/fabacademy-student-template/

How to edit it

You can edit it on Gitlab. The software used turns simple text files written in Markdown format, into the site you are navigating.

No worries, you can’t break anything, all the changes you make are saved under Version Control using GIT. This means that you have all the different versions of your page saved and available all the time in the Gitlab interface.

In short

  • This website is built automatically by gitlab every time you edit the files in the docs folder
  • It does so thanks to Mkdocs a static site generator written in Python
  • You must start customizing the file mkdocs.yml with your information
  • You can change the looks of your website using mkdocs themes, you can find in the mkdocs.yml the options for the Material Mkdocs theme
  • If you want to start from scratch, you can delete everything (using git-rm) in this repository and push any other static website