Skip to content

Commit ebbdffe

Browse files
Create 03-install-ssh-and-clone.md
Signed-off-by: Thomas Pichler <[email protected]>
1 parent cc21226 commit ebbdffe

File tree

1 file changed

+120
-0
lines changed

1 file changed

+120
-0
lines changed
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Step 3: Install Git Bash, Set Up SSH Key, and Clone the Repository
2+
3+
## 1. Install Git Bash
4+
5+
Git Bash is a command-line shell for Windows that provides Git and Unix commands.
6+
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).
11+
12+
## 2. Generate SSH Key and Start SSH Agent
13+
14+
SSH keys allow secure authentication with GitHub without entering your password every time.
15+
16+
### 2.1 Check for existing SSH keys
17+
18+
Open Git Bash and run:
19+
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.
24+
25+
2.2 Generate a new SSH key
26+
Create a new SSH key using the recommended Ed25519 algorithm:
27+
28+
bash
29+
Kopieren
30+
Bearbeiten
31+
ssh-keygen -t ed25519 -C "[email protected]"
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.
35+
36+
2.3 Start the SSH agent
37+
Start the SSH agent which manages your keys:
38+
39+
bash
40+
Kopieren
41+
Bearbeiten
42+
eval "$(ssh-agent -s)"
43+
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 [email protected]
63+
3. Add the SSH key to your GitHub account
64+
Log in to GitHub: https://github.com
65+
66+
Click on your profile picture (top-right) → Settings
67+
68+
Select SSH and GPG keys from the sidebar
69+
70+
Click New SSH key
71+
72+
Give your key a descriptive title (e.g., "My Laptop")
73+
74+
Paste your copied public SSH key into the "Key" field
75+
76+
Click Add SSH key
77+
78+
4. Test your SSH connection to GitHub
79+
Run:
80+
81+
bash
82+
Kopieren
83+
Bearbeiten
84+
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 [email protected]: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 "[email protected]"
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+
118+
119+
# Clone repository
120+
git clone [email protected]:Cerulean-Circle-GmbH/WODA.2023.git

0 commit comments

Comments
 (0)