2. Project management¶
This week I worked on building out more of my GitLab website. I describe how I did this below. I worked on my introduction web page to introduce myself to other students. I learned about steps for uploading files to my GitLab archive and made sure git was installed on my local PC. I want to make sure I know what I am doing before pushing, to not push large files or strain the system.
Assignment¶
work through a git tutorial build a personal site in the class archive describing you and your final project example example example
Checklist¶
Have you? | Done |
---|---|
Made a website and described how you did it | Yes |
Introduced yourself | Yes |
Documented steps for uploading files to archive | Yes |
Pushed to the class archive | Yes |
Signed and uploaded the Student Agreement | Yes |
Make my website¶
On my Fab Academy website index page I decided to make icons for each major part of my website using images from each assignment or project. I used Inkscape to trace the outlines of 3D and 3D models resulting in a pencil drawn black on white icon style. I used the Barran USSR font and traced the text using this font to add it to the icons, to keep the home page style intact.
I was getting driven nuts by not being able to control text formatting using Markdown, so I went to the link Markdown Cheatsheet by Adam Pritchard listed in Fab Academy Tutorials. The tutorial helped, and I was able to achieve the formatting I have wanted. I had to look elsewhere to find out that two spaces at the end of a markdown line adds a normal line break.
Introduced yourself¶
I created an about me section of this website in 2020. I have been updating and re-configuring this section multiple times per year. Furthermore, I would like this about me page to be a succinct intro covering my history and background leading up to what I do currently. Later I’d like to add more details about my path in life on a sub-page or pages that allow me to reflect on my own history and path, so I can better understand where I am now, why I’m doing what I do now and possible paths for the future.
VS Codium¶
After learning and using git from the command line for several weeks, I installed VS Codium (open source version of MS VS Code) VS Codium has spell check and many Markdown and code extensions that really sped up my markdown documentation. Here is an image of VS Codium editing the page you are reading, note the source control pane on the left showing options to commit to GitLab:
Git & VSCodium Setup¶
As of 2024-12-26
Git setup¶
Run these terminal commands in Debian Linux if you haven’t setup a key for git yet on your system.
sudo apt-get install git
cd ~/daniel-meyer
git --version
git config --global user.name "Daniel Meyer"
git config --global user.email "meistertek@gmail.com"
ls ~/.ssh
id_rsa id_rsa.pub
git clone https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/incitefocus/students/daniel-meyer.git
git config --global user.name "Daniel Meyer"
git config --global user.email "youremail"
ls ~/.ssh
ssh-keygen -t rsa -C "meistertek@gmail.com"
git status
I find it easiest to the setup VSCodium and manage my repo from there. If you have edited your gitlab.fabcloud.org website with the online editor you may want to pull the latest version down to your local folder to make sure you have the latest version before pushing up.
Change to your git repo directory:
cd ~/daniel-meyer
Pull the latest files.
git pull
VSCodium Setup¶
VSCodium setup on Debian Linux:
Install VS Codium per paulcarroty’s vscodium-deb-rpm-repo
Add Key
sudo wget https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \
-O /usr/share/keyrings/vscodium-archive-keyring.asc
Add Repo
echo 'deb [ arch=amd64 signed-by=/usr/share/keyrings/vscodium-archive-keyring.asc ] https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium main' \
| sudo tee /etc/apt/sources.list.d/vscodium.list
install VSCodium
sudo apt update
sudo apt install codium codium-insiders
in Linux LMDE seach destop gui “Menu” for codium.
Add Extensions¶
GitLab Workflow TeX+ – grammar/spell checking using LanguageTool Preview Increment Selection
Setup GitLab Workflow¶
In VSCodium go to file open folder and open the daniel-meyer folder and VSCodium will recognize as a git lab repo.
<<<<<<< HEAD
Next navigate to GitLab Workflow (fox head icon on upper left) and follow the instructions there. You will need the following
- Your email address you used to rgister for gitlab.fabcloud.org
- A new access token, sign in to gitlab.fabcloud.org
- and navigate to “Settings”, “Access tokens”, “Add new token”
- make sure to reveal and copy or save teh token locally on a thumb drive, or simply write it down for safe keeping.
- Enter the token into VSCodium/GitLab Workflow when asked after entering you username.
======= Next navigate to GitLab Workflow (fox head icon on upper left) and follow the instructions there. Keep in mind to use https://gitlab.fabcloud.org as your git lab instance.
a061aea13840ac79bf3e9eb77aa08c0d3ae77f63
Older VSCodium Notes¶
Here are my commands I ran to get my git setup!
meistertek@meistertek-ThinkPad-X1-Yoga-2nd:~$ git --version
git version 2.34.1
meistertek@meistertek-ThinkPad-X1-Yoga-2nd:~$ ls ~/.ssh/
ls: cannot access ‘/home/meistertek/.ssh/’: No such file or directory
meistertek@meistertek-ThinkPad-X1-Yoga-2nd:~$ ssh-keygen -t rsa -C "meistertek@gmail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/meistertek/.ssh/id_rsa):
Created directory ‘/home/meistertek/.ssh’.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/meistertek/.ssh/id_rsa
Your public key has been saved in /home/meistertek/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx meistertek@gmail.com
The key’s randomart image is:
+—[RSA 3072]----+
|xxxxxxxxxxxxxxxxx|
|ooooooooooooooooo|
|ooooooooooooooooo|
|ooooooooooooooooo|
|ooooooooooooooooo|
|ooooooooooooooooo|
|ooooooooooooooooo|
|ooooooooooooooooo|
|ooooooooooooooooo|
+----[SHA256]-----+
meistertek@meistertek-ThinkPad-X1-Yoga-2nd:~$ cat ~/.ssh/id_rsa.pub
ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= meistertek@gmail.com
meistertek@meistertek-ThinkPad-X1-Yoga-2nd:~$ git config --global user.name "Daniel Meyer"
meistertek@meistertek-ThinkPad-X1-Yoga-2nd:~$ git config --global user.email "meistertek@gmail.com"
meistertek@meistertek-ThinkPad-X1-Yoga-2nd:~$ ls ~/.ssh
id_rsa id_rsa.pub
meistertek@meistertek-ThinkPad-X1-Yoga-2nd:~$ git clone https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/incitefocus/students/daniel-meyer.git
Cloning into ‘daniel-meyer’…
remote: Enumerating objects: 6882, done.
…
Updating files: 100% (1229/1229), done.
meistertek@meistertek-ThinkPad-X1-Yoga-2nd:~$ git status
fatal: not a git repository (or any of the parent directories): .git
Shit I’m in the worng director thanks linux for telling me what’s wrong!
meistertek@meistertek-ThinkPad-X1-Yoga-2nd:~$ cd /home/meistertek/daniel-meyer
meistertek@meistertek-ThinkPad-X1-Yoga-2nd:~/daniel-meyer$ git status
On branch master
Your branch is up to date with ‘origin/master’.
nothing to commit, working tree clean
meistertek@meistertek-ThinkPad-X1-Yoga-2nd:~/daniel-meyer$ sudo apt-get install git
[sudo] password for meistertek:
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
git is already the newest version (1:2.34.1-1ubuntu1.6).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
meistertek@meistertek-ThinkPad-X1-Yoga-2nd:~/daniel-meyer$ sudo apt update
Hit:1 http://mirrors.gigenet.com/ubuntuarchive jammy InRelease
Ign:2 http://packages.linuxmint.com vera InRelease
Hit:3 http://mirrors.gigenet.com/ubuntuarchive jammy-updates InRelease
…
Hit:13 https://ppa.launchpadcontent.net/inkscape.dev/stable/ubuntu jammy InRelease
Hit:14 https://ppa.launchpadcontent.net/mixxx/mixxx/ubuntu jammy InRelease
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
All packages are up to date.
meistertek@meistertek-ThinkPad-X1-Yoga-2nd:~/daniel-meyer$ sudo add-apt-repository ppa:git-core/ppa
You are about to add the following PPA:
The most current stable version of Git for Ubuntu.
For release candidates, go to https://launchpad.net/~git-core/+archive/candidate . More info: https://launchpad.net/~git-core/+archive/ubuntu/ppa Press Enter to continue or Ctrl+C to cancel … Get:17 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu jammy/main Translation-en [2,088 B] … After this operation, 11.4 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu jammy/main amd64 git amd64 1:2.39.1-0ppa1~ubuntu22.04.1 [6,161 kB] … Processing triggers for man-db (2.10.2-1) … meistertek@meistertek-ThinkPad-X1-Yoga-2nd:~/daniel-meyer$
ALL DONE! Now I’m ready to do command line git push and pull or to install git for Visual Studio Code.
For Visual Studio Code I ened up simply installing the offical GitLab Workflow extension and from there followed the instructions that showed up in Visual Studio Code ater the extension was installed, Then at https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/incitefocus/ I went to Settings then access tokens, and then setup an access token for myself as a maintainer.
Then I clicked the “Add Account” button in the VS Code GitLab Workflow sidebar in VS Code.
I then pasted the line below into the VS Code box that popped up
https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/incitefocus/students/daniel-meyer/-/settings/access_tokens
Then I clicked the clippy board icon to copy my new project access token on my gitlab and pasted that into the VS Code box that popped up
That failed :( with the following logged errors:
userMessage”: “Request failed: Can’t add GitLab account for https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/incitefocus/students/daniel-meyer. Check your instance URL and network connection.”, “errorMessage”: “invalid json response body at https://gitlab.fabcloud.org/users/sign_in reason: Unexpected token < in JSON at position 0”, “stack”: [ “FetchError: invalid json response body at https://gitlab.fabcloud.org/users/sign_in reason: Unexpected token < in JSON at position 0”, “\tat /home/meistertek/.vscode/extensions/gitlab.gitlab-workflow-3.59.2/out/extension.js:4:332857”, “\tat process.processTicksAndRejections (node:internal/process/task_queues:96:5)”, “\tat async wu (/home/meistertek/.vscode/extensions/gitlab.gitlab-workflow-3.59.2/out/extension.js:450:2372)”, “\tat async LT (/home/meistertek/.vscode/extensions/gitlab.gitlab-workflow-3.59.2/out/extension.js:450:3162)”, “\tat async /home/meistertek/.vscode/extensions/gitlab.gitlab-workflow-3.59.2/out/extension.js:489:7556”, “\tat async s.h (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:94:107614)”
To figue out what I was doing wrong I looked at Nadieh’s Fab Academy site at: https://fabacademy.org/2021/labs/waag/students/nadieh-bremer/blog/week-1a/#using-http—dead-end
What I was doing wrong: I needed to enter only “https://gitlab.fabcloud.org” and then my token after that. I was entering my entire fitlab.fabcloud.org/etc etc site name.
Next I installed LTeX to spell check code and documents in VS Code. LTeX is a Grammar/spell checker using LanguageTool with support for LaTeX, Markdown, and others.
Running Git from Terminal¶
Today I worked on setting up for my first git clone, pull and push.
git clone git@gitlab.fabcloud.org:academany/fabacademy/2020/labs/incitefocus/students/daniel-meyer.git
This was the result:
Cloning into ‘daniel-meyer’… The authenticity of host ‘gitlab.fabcloud.org (13.59.248.79)’ can’t be established. ECDSA key fingerprint is SHA256:Rphnjz211wPLjTJcyAip0xozt0hOoFgT9hl5eZfxzd0. Are you sure you want to continue connecting (yes/no)? n Please type ‘yes’ or ‘no’: no Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.’‘
Something was wrong, so I decide to run the commands below to double-check things:
git --version
git version 2.17.1
ls ~/.ssh/
id_##### id_#####.pub
cat ~/.ssh/id_rsa.pub
cat: /home/meistertek/.ssh/id_rsa.pub: No such file or directory
so I ran the command:
ssh-keygen -t rsa -C "my_email"
Generating public/private rsa key pair. Enter file in which to save the key (/home/meistertek/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/meistertek/.ssh/id_rsa. Your public key has been saved in /home/meistertek/.ssh/id_rsa.pub. The key fingerprint is: SHA256:#####myemail The key’s randomart image is:
+—[RSA 2048]----+
| ** |
| ** |
| ** |
| ** |
| ** |
| ** |
| ** |
| ** |
| ** |
+----[SHA256]-----+
Ok so now I had a sha256 key setup, time to re-try
cat ~/.ssh/id_rsa.pub
ssh-rsa #########
Cool my ssh-rsa key was working
Now I followed the ret of the steps at: http://academany.fabcloud.io/fabacademy/2020/recitations/version-control/
git clone https://gitlab.fabcloud.org/my-site address as copied from blue clone dropdown button link on git lab
Cloning into ‘daniel-meyer’…
The authenticity of host ‘gitlab.fabcloud.org (##.##.###.##)’ can’t be established.
ECDSA key fingerprint is SHA256:######.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘gitlab.fabcloud.org,##.##.###.##’ (ECDSA) to the list of known hosts.
remote: Enumerating objects: 42, done.
remote: Counting objects: 100% (42/42), done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 490 (delta 20), reused 0 (delta 0)
Receiving objects: 100% (490/490), 3.00 MiB | 13.89 MiB/s, done.
Resolving deltas: 100% (286/286), done.
It looked like maybe it worked? I thought about where the repository may be located locally… I browsed my home directory and sure enough there was my local repository in /home/meistertek/daniel-meyer
Yay!
Now it was time for me to batch process all myu photos with ImageMagick, which was a blast from the past for me. I used to use ImageMagick on a Sun SPARCstation CAD Workstation running UNIX back in the late 90’s. We used a gui with ImageMagick x-windows back then, so I looked to a IamgeMagick gui, it looked like a pain to install. So I decided to look at GIMP batch processing. I found this site for a gimp batch gui plugin that allows re-size and compression to be done easily. [https://ulyssesonline.com/2008/09/22/batch-resize-images-with-gimp/] This worked quite well and was easy to use.
Next I worked on pushing my git repo back up with all the smaller batch processed images.
git status
On branch master Your branch is up-to-date with ‘origin/master’.
Changes not staged for commit:
(use “git add/rm
deleted: docs/images/fabshop/hdmakerslidewheels.jpg
deleted: docs/images/fabshop/leanfablabven.jpg
deleted: docs/images/fabshop/rigidmakerslide.jpg
deleted: docs/images/sample-pic-2.jpeg
deleted: docs/images/scijigs.jpg
deleted: docs/images/scimillsketch1.jpg
deleted: docs/images/scirota.jpg
deleted: docs/images/week01/Fab_Shop_Ad.jpg
deleted: docs/images/week01/assignment-photo.jpg
deleted: docs/images/week01/dmeyer_bike.jpg
deleted: docs/images/week01/dmeyer_mazak_cnc.jpg
deleted: docs/images/week01/dmeyer_trs80_modem.jpg
deleted: docs/images/week01/dmeyer_welder.jpg
deleted: docs/images/week01/msi_fab_lab_team.JPG
deleted: docs/images/week01/sshc_airplane_hackers.jpg
Untracked files:
(use “git add
docs/images/fabshop/land/
docs/images/fabshop/port/
docs/images/week01/land/
docs/images/week01/port/
no changes added to commit (use “git add” and/or “git commit -a”)
ok the above reflected the changes I had made locally
I had been changing .mk files online through git lab and I had made changes locally to images re-sizing them and making a better images folder structure. Next I ran a git add . Command
git add
Nothing returned which in Linux/Unix means all went well.
git pull
remote: Enumerating objects: 24, done. remote: Counting objects: 100% (24/24), done. remote: Compressing objects: 100% (16/16), done. remote: Total 20 (delta 15), reused 6 (delta 4) Unpacking objects: 100% (20/20), done. From gitlab.fabcloud.org:academany/fabacademy/2020/labs/incitefocus/students/daniel-meyer 6aaee36..46ac5be master -> origin/master Updating 6aaee36..46ac5be Fast-forward docs/assignments/week02.md | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 111 insertions(+), 4 deletions(-)
This looked correct since I had edited online the wee02.md file. Now for git merge
git merge
Already up to date.
now git commit -m ‘re-sized images and added folders’
git commit -m 're-sized images and added folders'
[master 82def63] re-sized images and added folders
28 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 docs/images/fabshop/hdmakerslidewheels.jpg
create mode 100644 docs/images/fabshop/land/Fab_Shop_Ad.jpg
create mode 100644 docs/images/fabshop/land/hdmakerslidewheels.jpg
create mode 100644 docs/images/fabshop/land/leanfablabven.jpg
create mode 100644 docs/images/fabshop/land/rigidmakerslide.jpg
create mode 100644 docs/images/fabshop/land/scijigs.jpg
create mode 100644 docs/images/fabshop/land/scirota.jpg
delete mode 100644 docs/images/fabshop/leanfablabven.jpg
create mode 100644 docs/images/fabshop/port/scimillsketch1.jpg
delete mode 100644 docs/images/fabshop/rigidmakerslide.jpg
delete mode 100644 docs/images/sample-pic-2.jpeg
delete mode 100644 docs/images/scijigs.jpg
delete mode 100644 docs/images/scimillsketch1.jpg
delete mode 100644 docs/images/scirota.jpg
delete mode 100644 docs/images/week01/Fab_Shop_Ad.jpg
delete mode 100644 docs/images/week01/assignment-photo.jpg
delete mode 100644 docs/images/week01/dmeyer_bike.jpg
delete mode 100644 docs/images/week01/dmeyer_mazak_cnc.jpg
delete mode 100644 docs/images/week01/dmeyer_trs80_modem.jpg
delete mode 100644 docs/images/week01/dmeyer_welder.jpg
create mode 100644 docs/images/week01/land/dmeyer_bike.jpg
create mode 100644 docs/images/week01/land/dmeyer_mazak_cnc.jpg
create mode 100644 docs/images/week01/land/dmeyer_welder.jpg
create mode 100644 docs/images/week01/land/msi_fab_lab_team.jpg
create mode 100644 docs/images/week01/land/sshc_airplane_hackers.jpg
delete mode 100644 docs/images/week01/msi_fab_lab_team.JPG
create mode 100644 docs/images/week01/port/dmeyer_trs80_modem.jpg
delete mode 100644 docs/images/week01/sshc_airplane_hackers.jpg
ok that was all the stuff that I changed locally being committed to the buffer I guess? now to push
git push
Counting objects: 23, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (22/22), done.
Writing objects: 100% (23/23), 961.15 KiB | 24.03 MiB/s, done.
Total 23 (delta 2), reused 0 (delta 0)
To gitlab.fabcloud.org:academany/fabacademy/2020/labs/incitefocus/students/daniel-meyer.git
46ac5be..82def63 master -> master
That seemed to work… now to check my git lab fab academy site to see if things worked. It look like it did. However my photo links in my .md files were broken, which was expected. Now off to fix them!
I now have much better understanding of how git works!
References¶
Version control recitation video