# Create your GitHub Repo

## Set up your repo

{% hint style="info" %}
If you have a pre-existing repo you wish to use, feel free to skip this section
{% endhint %}

Your Github repo will be where you store your docker compose files, and anything else you wish to store alongside it. Placing these files in Github makes the risk of losing your compose files to a dead harddrive impossible.

You can also store your Ansible playbooks in there too [Ansible](/guides/installation-guides/ansible.md)

### Create a Github repo

[Follow GitHubs documentation on creating a repo](https://docs.github.com/en/get-started/quickstart/create-a-repo)

[Recommended: Set your repo as private](https://docs.publishing.service.gov.uk/manual/make-github-repo-private.html)

{% hint style="info" %}
I would recommend creating a Private repo as this hides it from the public internet. The advantage of this is it reduces the risk of leaking credentials, API keys etc if you accidentally save them into a file on the repo.\
\
The best way to secure your repo is to use variables and [secrets](https://docs.github.com/en/actions/concepts/security/secrets)
{% endhint %}

{% hint style="danger" %}
Version history is always there, so if you accidentally save a password or API key its saved forever. The only way to remove it is to delete the repo.
{% endhint %}

## If you are using a private repo,

{% hint style="info" %}
If you are using a public repo, skip this section
{% endhint %}

### Create a Private Access Token for Portainer

As your repo is private, you will need to create a PAC for Portainer to use and access the repo

1. Click on your profile in the top right, then select Settings
2. On the left, click on Developer Settings
3. Click on Personal Access Tokens, then 'Tokens (classic)'
4. Click on 'Generate new token', then select 'Classic'
5. Input the below information

   <figure><img src="/files/gaOURSO7eviFXA7GO52k" alt=""><figcaption><p>You can expire the credential if you want, though this may break Portainer</p></figcaption></figure>
6. Scroll down and click on 'Generate Token'
7. Save your PAC to your password vault


---

# 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://www.trentbauer.com/guides/installation-guides/gitops/create-your-github-repo.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.
