Skip to content

Commit f394e65

Browse files
committed
Adding a page about using Tetralith
1 parent 9e256a5 commit f394e65

File tree

1 file changed

+127
-0
lines changed

1 file changed

+127
-0
lines changed

docs/tetralith.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
---
2+
title: "Lecture D: Using Tetralith for the Git course"
3+
tags: Lecture, Birgitte, day 1
4+
description: "Git installation, use of Tetralith, etc"
5+
---
6+
7+
<!-- Lecture material made by Birgitte Brydsö for the version of the course that was given in fall 2020. Lecture was first given by Birgitte Brydsö in fall 2020.
8+
Minor modifications done for the fall 2021 and 2022 versions of the course. For the 2023 version of the course the machine was changed from Kebnekaise to Rackham. In 2024, Rackham will also be used.
9+
For the 2024 version of the course, the machine was changed from Rackham to Tetralith, though the material for using Triolith remains, as Lecture B. -->
10+
11+
<!-- Slides: https://hackmd.io/@git-fall-2024/tetralith#/ -->
12+
13+
---
14+
15+
# Connecting to Tetralith
16+
17+
## ThinLinc
18+
19+
For this course we recommend using ThinLinc, but if you have your own installation of another SSH client that you prefer, you are welcome to use that. We will be using the command line only, so an SSH client like PuTTY would also work.
20+
21+
* Download the ThinLinc client from https://www.cendio.com/thinlinc/download and install it.
22+
23+
## Logging in
24+
25+
* Start the client. Enter the name of the server: ``tetralith.nsc.liu.se`` and then enter your own username.
26+
* Go to "Options" -> "Security". Check that authentication method is set to password.
27+
* Go to "Options" -> "Screen" and uncheck "Full screen mode".
28+
* Enter your NSC password. Click "Connect".
29+
30+
If you prefer a different SSH client (terminal, etc.), you connect with ``ssh -Y <user>@tetralith.nsc.liu.se``
31+
32+
**NOTE** 2FA is needed.
33+
34+
- Information about connecting: https://www.nsc.liu.se/support/getting-started/
35+
- More specific about 2FA: https://www.nsc.liu.se/support/2fa/
36+
37+
---
38+
39+
## Setting up Git
40+
41+
Git is already installed on Tetralith, but you need to set your name and email globals *unless you have already done this at some earlier time*.
42+
43+
* Open a terminal. In ThinLinc: Go to the menu at the top. Click “Applications” → “System Tools” → “MATE Terminal”.
44+
* Set your global name (change "Your Name"):
45+
`$ git config --global user.name "Your Name"`
46+
* Set your global email (change the example):
47+
`$ git config --global user.email "[email protected]"`
48+
49+
You may also want to set your editor. We recommend nano, but other options are vim and emacs (or notepad on Windows).
50+
51+
* `$ git config --global core.editor nano`
52+
53+
---
54+
55+
## Testing your configuration
56+
57+
Create an example folder and cd into that, then create a file test.txt:
58+
59+
```bash
60+
$ mkdir <mydir>
61+
$ cd <mydir>
62+
$ touch test.txt
63+
```
64+
65+
Now initialize a repository and add the new file:
66+
67+
```bash
68+
$ git init
69+
$ git add test.txt
70+
```
71+
72+
Now *commit* the change. The editor which you configured earlier should open. Add an example commit message:
73+
74+
```bash
75+
$ git commit test.txt
76+
```
77+
78+
---
79+
80+
Now let us look at the log:
81+
82+
```bash
83+
$ git log
84+
```
85+
86+
When you do `git log`, you should see something like:
87+
88+
```bash
89+
commit ff8b6f699d98c72d5cffc64d65a1c618b976b45a (HEAD -> master)
90+
Author: Birgitte Brydsö <[email protected]>
91+
Date: Thu Sep 17 13:53:59 2020 +0200
92+
93+
Test of git
94+
```
95+
96+
but with name, email and commit message different.
97+
98+
If that is the case, your Git should be configured correctly.
99+
100+
---
101+
102+
## Download the course materials
103+
104+
For the individual hands-on part of the course, we have created some course materials which you will download from either the course website, the course GitHub, or the "important information" page.
105+
106+
* Course website: https://www.hpc2n.umu.se/events/courses/2024/fall/git
107+
* Course GitHub: https://github.com/hpc2n/course-intro-git
108+
- Click the green button labeled "Code" for links to clone or download the materials.
109+
- Either do **1. CLONE** or **2. DOWNLOAD**, not both!
110+
- CLONE: Change to the directory where you wish to have the course material and clone with 'git clone' and the url:
111+
- ``git clone https://github.com/hpc2n/course-intro-git.git``
112+
- You get the directory: `course-intro-git`
113+
- DOWNLOAD Zipfile: Please go to the terminal window where you have downloaded and set up Git. Change the directory to wherever you wish to have the course material.
114+
- Download the Zipfile and move it there. Can be done directly from the terminal with `wget https://github.com/hpc2n/course-intro-git/archive/refs/heads/main.zip`)
115+
- Unpack with `unzip main.zip`.
116+
- You will get a directory called `course-intro-git-main`.
117+
118+
---
119+
120+
## GitHub and SSH keys
121+
122+
* You need to create an account on GitHub for the course
123+
* You also need to create SSH keys on Tetralith and install these on GitHub
124+
* We will go through this in a general way which should work regardless of system you are using
125+
* We will go through it before the Teamwork session. The material for creating and setting up SSH keys are here: https://hackmd.io/@git-fall-2024/LC-github
126+
127+

0 commit comments

Comments
 (0)