# Using Github with SSH keys

## Generate a public/private RSA key pair <a href="#generate_a_publicprivate_rsa_key_pair" id="generate_a_publicprivate_rsa_key_pair"></a>

Skip to next step if you have an existing SSH key pair.

{% hint style="info" %}
Windows users can use either PowerShell, Windows Terminal, or WSL (Windows Subsystem for Linux).  Mac and Linux users should use their preferred terminal.
{% endhint %}

Run the `ssh-keygen` command with default arguments to generate and replace your private keypair.

```
ssh-keygen -t rsa
```

You will be prompted to provide a filename and an additional password if required.

{% hint style="info" %}
It is common to NOT use a password with the private key because the operating system already controls user access.
{% endhint %}

The output will look like this:

<figure><img src="/files/wv9CbVDpe5njQOQ2p02z" alt="" width="563"><figcaption></figcaption></figure>

## Copy the public key

Use the terminal to display the public key, highlight, and copy to clipboard.

{% hint style="danger" %}
The public key will have a .pub file extension.  You should never share your private key!
{% endhint %}

```
$ cd $HOME/.ssh
$ cat id_rsa.pub
```

The output will look similar to the following:

<figure><img src="/files/w8ECBlsEHiTfasvRgY60" alt=""><figcaption></figcaption></figure>

## Save the public key to GitHub

Navigate to 'Settings' under your GitHub profile.  In the Left navigation select 'SSH and GPG keys':

<figure><img src="/files/4Ux00wrE5pwZcwfp0fJa" alt="" width="172"><figcaption></figcaption></figure>

Select 'New SSH key', add a title with any descriptive name, and paste the public key into the Key textarea:

<figure><img src="/files/0uegvTn5OHva8qJi4WDn" alt="" width="375"><figcaption></figcaption></figure>

Your repos will now show clone commands using SSH:

<figure><img src="/files/MHTiE8CGUaLNF33BpoZ2" alt="" width="238"><figcaption></figcaption></figure>


---

# 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.denvrdata.com/docs/additional-information/faqs/using-github-with-ssh-keys.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.
