# Git Clone Repo via SSH

Steps:

1. Generate SSH Key

```bash
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519
```

1. Get the `PUBLIC` key and add it to `Github` or `Gitlab` or `other-Git-itteration`

```bash
cd ~/.ssh/
cat key.pub
```

* Now click New SSH key on top. Type name of your key (something like Work MacBook) and paste contents of your public key.

1. Let’s force your machine to use proper key for Github SSH connection. Go back to your terminal:

```bash
vim ~/.ssh/config
```

* Paste config:

```bash
Host github.com
    HostName github.com
    User git
    IdentityFile ~/.ssh/github
    PreferredAuthentications publickey
```

1. Let’s check Github connection:

```bash
ssh -T git@github.com
```

* If everything is OK. you should get: `Hi $USERNAME! You've successfully authenticated, but GitHub does not provide shell access.`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.arkannis.net/devops/git/git-clone-repo-via-ssh.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
