GitHub Repo and Token

Time Required

10 Minutes

Difficulty

Low

Set up your Repo

If you have a pre-existing repo you wish to use, skip the creation part.

Create a Private Repo

Follow GitHubs documentation on creating a repo

Ensure Repo is Private

Ensure your repo is set to private, or switch it to private

Somethings to think about

Private vs Public repo

I would recommend creating a Private repo so you can store private information, such as API keys in it.

If you're going to obfuscate your files with variables or secrets (which you will need to store elsewhere), you could make the repo Public. But in my opinion, its better to be safe than sorry.

Please note that the version history is also public, so if you accidentally save a password or API key its saved forever.

What to name your repo

Your repo should be named something you remember and unique to you. It doesn't really matter though. I would suggest something short so your repo url is short

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\

    You can expire the credential if you want, though this may break Portainer
  6. Scroll down and click on 'Generate Token'

  7. Save your PAC to your password vault

Last updated

Was this helpful?