Skip to content

Commit 47b38bb

Browse files
Update 03-install-ssh-and-clone.md
Signed-off-by: Thomas Pichler <54631167+PichlerThomas@users.noreply.github.com>
1 parent ebbdffe commit 47b38bb

File tree

1 file changed

+41
-97
lines changed

1 file changed

+41
-97
lines changed
Lines changed: 41 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,64 @@
1-
# Step 3: Install Git Bash, Set Up SSH Key, and Clone the Repository
2-
3-
## 1. Install Git Bash
4-
1+
Step 2: Install Git Bash, Set Up SSH Key, and Clone the Repository
2+
1. Install Git Bash
53
Git Bash is a command-line shell for Windows that provides Git and Unix commands.
64

7-
- Download Git Bash here:
8-
[https://git-scm.com/downloads](https://git-scm.com/downloads)
9-
- Run the installer and follow the setup instructions.
10-
- After installation, open Git Bash (e.g., from the Start menu).
5+
Download Git Bash from the official website:
6+
https://git-scm.com/downloads
117

12-
## 2. Generate SSH Key and Start SSH Agent
8+
Run the installer and follow the setup instructions.
139

14-
SSH keys allow secure authentication with GitHub without entering your password every time.
10+
After installation, open Git Bash (e.g. from the Start menu).
1511

16-
### 2.1 Check for existing SSH keys
12+
2. Generate SSH Key and Start SSH Agent
13+
SSH keys allow secure authentication with GitHub without typing your password every time.
1714

15+
2.1 Check for existing SSH keys
1816
Open Git Bash and run:
1917

20-
```bash
21-
ls ~/.ssh
22-
23-
If you see files like id_ed25519 and id_ed25519.pub, you already have an SSH key. If not, continue to step 2.2.
18+
<pre> ls ~/.ssh </pre>
19+
If you see files like id_ed25519 and id_ed25519.pub, you already have an SSH key and can skip to step 2.4.
20+
If you don’t, continue with the next step.
2421

2522
2.2 Generate a new SSH key
26-
Create a new SSH key using the recommended Ed25519 algorithm:
23+
Run this command to create a new SSH key using the Ed25519 algorithm:
2724

28-
bash
29-
Kopieren
30-
Bearbeiten
31-
ssh-keygen -t ed25519 -C "your.email@example.com"
32-
Press Enter to accept the default file location (/c/Users/YourUsername/.ssh/id_ed25519).
33-
34-
Optionally enter a passphrase for added security, or press Enter to leave it empty.
25+
<pre> ssh-keygen -t ed25519 -C "your_email@example.com" </pre>
26+
Press Enter to accept the default file location, then (optionally) enter a secure passphrase.
3527

3628
2.3 Start the SSH agent
37-
Start the SSH agent which manages your keys:
29+
Start the SSH agent in the background with:
3830

39-
bash
40-
Kopieren
41-
Bearbeiten
42-
eval "$(ssh-agent -s)"
31+
<pre> eval "$(ssh-agent -s)" </pre>
4332
2.4 Add your SSH key to the agent
44-
Add the SSH private key you just created to the agent:
45-
46-
bash
47-
Kopieren
48-
Bearbeiten
49-
ssh-add ~/.ssh/id_ed25519
50-
2.5 Copy your public SSH key
51-
Display your public SSH key and copy its entire content:
52-
53-
bash
54-
Kopieren
55-
Bearbeiten
56-
cat ~/.ssh/id_ed25519.pub
57-
It should look like this:
58-
59-
bash
60-
Kopieren
61-
Bearbeiten
62-
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK2ohzmAhDaTtegkkRluKcpXo2ecGlLOV/pCFbprh5Ro your.email@example.com
63-
3. Add the SSH key to your GitHub account
64-
Log in to GitHub: https://github.com
33+
Now add your private key to the agent:
6534

66-
Click on your profile picture (top-right) → Settings
35+
<pre> ssh-add ~/.ssh/id_ed25519 </pre>
36+
You should see confirmation like:
6737

68-
Select SSH and GPG keys from the sidebar
38+
Identity added: /c/Users/YOUR_NAME/.ssh/id_ed25519 (your_email@example.com)
6939

70-
Click New SSH key
40+
3. Add the SSH key to your GitHub account
41+
Copy the contents of your public key file:
7142

72-
Give your key a descriptive title (e.g., "My Laptop")
43+
<pre> cat ~/.ssh/id_ed25519.pub </pre>
44+
Go to GitHub > Settings > SSH and GPG keys
7345

74-
Paste your copied public SSH key into the "Key" field
46+
Click New SSH key, give it a name (e.g. "My Laptop")
7547

76-
Click Add SSH key
48+
Paste the key into the "Key" field and click Add SSH key
7749

7850
4. Test your SSH connection to GitHub
79-
Run:
80-
81-
bash
82-
Kopieren
83-
Bearbeiten
84-
ssh -T git@github.com
85-
You should see a message like:
86-
87-
vbnet
88-
Kopieren
89-
Bearbeiten
90-
Hi YourGitHubUsername! You've successfully authenticated, but GitHub does not provide shell access.
91-
5. Clone the repository
92-
Now you can clone the repository:
93-
94-
bash
95-
Kopieren
96-
Bearbeiten
97-
git clone git@github.com:Cerulean-Circle-GmbH/WODA.2023.git
98-
This will download the repository into your current folder.
99-
100-
Summary of important commands
101-
bash
102-
Kopieren
103-
Bearbeiten
104-
# Generate SSH key
105-
ssh-keygen -t ed25519 -C "your.email@example.com"
106-
107-
# Start SSH agent
108-
eval "$(ssh-agent -s)"
109-
110-
# Add SSH key to agent
111-
ssh-add ~/.ssh/id_ed25519
112-
113-
# Show public SSH key
114-
cat ~/.ssh/id_ed25519.pub
115-
116-
# Test GitHub SSH connection
117-
ssh -T git@github.com
118-
119-
# Clone repository
120-
git clone git@github.com:Cerulean-Circle-GmbH/WODA.2023.git
51+
Verify everything is working:
52+
53+
<pre> ssh -T git@github.com </pre>
54+
You should see:
55+
56+
Hi USERNAME! You've successfully authenticated, but GitHub does not provide shell access.
57+
58+
5. Clone the Repository
59+
Now that SSH is set up, you can clone the repository:
60+
61+
<pre> git clone git@github.com:Cerulean-Circle-GmbH/WODA.2023.git </pre>
62+
You should see output like:
63+
64+
<pre> Cloning into 'WODA.2023'... remote: Enumerating objects: ... ... Resolving deltas: ... </pre>

0 commit comments

Comments
 (0)