# Step 1: Github

Sign up for a free GitHub.com account at <https://github.com/join> if you don’t already have one.

Complete these installation instructions depending on your operating system:

## 1.  Install Git on your laptop

If `git` already installed, you can the path to your git and version

{% code overflow="wrap" %}

```sh
$ which git
## /usr/bin/git

$ git --version
## git version 2.39.0
```

{% endcode %}

### Download for macOS

First install [homebrew](https://brew.sh/) if you don't already have it, then run the following command:

```sh
$ brew install git
```

### Download for Windows

Follow this [link](https://git-scm.com/download/win) for windows installation

## 2. Git configuration

Once `git` is installed, you can configure `git` by using your **GitHub** username and email address

```sh
$ git config --global user.name "John Doe"
$ git config --global user.email "johndoe@example.com"
$ git config --global --list
```

## 3. Set up credentials

To connect to GitHub via SSH, you will need to:

1. Create new SSH key
2. Add SSH key to GitHub account

### Check for existing SSH key

Before generating new SSH key, verify if you already have one.&#x20;

Open Git Bash, then:

```git
$ ls -al ~/.ssh
# Lists the files in your .ssh directory, if they exist
```

Check if you have the following files by default

* *id\_rsa.pub*
* *id\_ecdsa.pub*
* *id\_ed25519.pub*

### Create a new SSH key

Run the following commands in your bash

```sh
$ ssh-keygen -t ed25519 -C "your_email@example.com"
> Generating public/private ALGORITHM key pair.

# either set passphrase or leave it blank
> press enter
> Enter passphrase (empty for no passphrase): [Type a passphrase]
> Enter same passphrase again: [Type passphrase again]
```

### Add SSH key to ssh-agent

Run the following commands in your bash

{% tabs %}
{% tab title="Mac" %}

```sh
$ eval "$(ssh-agent -s)"
> Agent pid 59566

$ open ~/.ssh/config
> The file /Users/YOU/.ssh/config does not exist.

$ touch ~/.ssh/config

$ nano ~/.ssh/config
## paste the following in the config file
Host github.com
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_ed25519

$ ssh-add --apple-use-keychain ~/.ssh/id_ed25519
```

{% endtab %}

{% tab title="Windows" %}

```sh
$ eval "$(ssh-agent -s)"
> Agent pid 59566

$ ssh-add ~/.ssh/id_ed25519
```

{% endtab %}
{% endtabs %}

### Add new SSH key to your GitHub account

Run the following commands in your bash

{% tabs %}
{% tab title="Mac" %}

```sh
$ pbcopy < ~/.ssh/id_ed25519.pub
  # Copies the contents of the id_ed25519.pub file to your clipboard
```

{% endtab %}

{% tab title="Windows" %}

```sh
$ clip < ~/.ssh/id_ed25519.pub
  # Copies the contents of the id_ed25519.pub file to your clipboard
```

{% endtab %}
{% endtabs %}

this will copy your **SSH Key** to keypad,  go to settings of your **GitHub** profile -> in the **"Access"** section on the sidebar, go to **SSH and GPG keys** -> **New SSH Key** or **Add SSH key** -> give a **title** & paste your previously copied key into the **"Key"** field.&#x20;

### 4. Personal access token

1. In the upper-right corner of any page, click your profile photo, then click **Settings**.
2. In the left sidebar, click **Developer settings**.
3. In the left sidebar, under **Personal access tokens**, click **Tokens (classic)**
4. Click **Generate new token**.
5. Under **Token name**, enter a name for the token.
6. Under **Expiration**, select an expiration for the token.
7. Give your token a descriptive name.
8. Select the scopes you'd like to grant this token. You can select: \
   **repo & everything under repo**\
   **admin:repo\_hook & everything under repo**\
   **delete\_repo**
9. Click **Generate token**.

Make sure to copy & store this token safely. When you first configure your project, you will be asked for **Username** & **Password** as shown below. This is where you will use your token

```sh
$ git push -u origin main
Username: Your_Github_username
Password: Your_token
```

&#x20;


---

# 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://data-to-production.gitbook.io/product-docs/fundamentals/getting-started/step-1-github.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.
