Skip to content

Commit f1486e4

Browse files
Add instructions on testing GitHub connection (#40)
1 parent 760a328 commit f1486e4

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

SSH.qmd

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ eval "$(ssh-agent -s)"
132132
```
133133

134134
which should display an output similar to something like this:
135-
```bash
135+
136+
```
136137
Agent pid 59566
137138
```
138139

@@ -142,7 +143,26 @@ Then, add your key to the ssh-agent by typing the entirety of this command:
142143
ssh-add ~/.ssh/id_ed25519
143144
```
144145

145-
That's it !
146+
## Testing Your Connection to GitHub
147+
148+
(These instructions are a slightly abbreviated version of the page here: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection)
149+
150+
Finally, we can "ask" GitHub at the command line if our connection is acceptable with the following code:
151+
152+
```bash
153+
ssh -T git@github.com
154+
# Attempts to ssh to GitHub
155+
```
156+
157+
You will likely be asked about "fingerprinting" to which you can type `yes`, fingerprinting is okay, and press Enter. You should then receive a message like this:
158+
159+
```
160+
> Hi USERNAME! You've successfully authenticated, but GitHub does not
161+
> provide shell access.
162+
```
163+
164+
That's it!
165+
146166
Going forward, you can use the SSH clone URL when copying a repo to your local machine (we will cover this in the second tutorial). You are completely done with the setting up part, which you will need to repeat only if you change computer.
147167
Let the fun begin!
148168

0 commit comments

Comments
 (0)