Bash.tv → GitHub → itch.io

← Home

Connecting GitHub to a Bash.tv Space

This guide shows how to let the Bash bot read and save code in your GitHub repository. Do these steps once for each space.


What you need


How to read the screenshots

The screenshots use colored boxes to show what to do:


Part 1: Create a token on GitHub

A token is like a password that only works for the repos and actions you pick.

  1. Go to GitHub → profile picture → Settings → Developer settings → Personal access tokens → Fine-grained tokens. Direct link: https://github.com/settings/personal-access-tokens/new (You can also click the “Create one in GitHub” link in the Bash form shown in Part 2.)
  2. Click Generate new token. The New fine-grained personal access token page opens.

    New fine-grained personal access token page

  3. Token name: something you’ll recognize, like Bash - <space name>. Description is optional.
  4. Resource owner: choose your own account, or the organization that owns the repo.
  5. Expiration: choose how long it should work. 30 or 90 days is a safe choice. When it expires, follow this guide again. Avoid No expiration.

    Expiration options: 7, 30, 60, 90 days, Custom, No expiration

  6. Repository access: choose Only select repositories, click Select repositories, and pick the repo or repos this space should use.
  7. Permissions: click + Add permissions, then add these under Repositories:

    Permissions: Contents and Pull requests set to Read and write, Metadata read-only

    Permission Setting Needed?
    Contents Read and write Required. Lets the bot read and save code
    Metadata Read-only Added automatically
    Pull requests Read and write Optional. Lets the bot open pull requests
  8. Click Generate token.
  9. Copy the token now. It starts with github_pat_, and GitHub only shows it once.

Never paste the token into the Bash chat. Everyone watching the space can see the chat. Paste it only into the form in Part 2.


Part 2: Add the token to your Bash space

  1. Open your space’s Settings → API keys and choose GitHub. The Add GitHub key form opens.

    Add GitHub key form: the Key field and Tips for the bot

  2. Key: paste the github_pat_... token.
  3. Tips for the bot (optional): a short note, for example Use for the repo YourName/YourRepo.
  4. More options: you don’t need to change anything. The defaults should look like this:

    More options: Name, addresses, and username

    Field Value
    Name GitHub
    Address 1 api.github.com → Bearer token
    Address 2 github.com → Username and password
    Username x-access-token
    Send it differently to each address ✅ checked
  5. Click Add key.

Part 3: Ask the bot to check it

Send the bot a message in your space, for example:

GitHub is connected. My repo is https://github.com/YourName/YourRepo. Please check that it works.

The bot will check that:

The bot never sees the token itself. Bash adds it automatically whenever the bot talks to GitHub.


Troubleshooting

Problem Fix
The bot says no key is connected Make sure you clicked Add key in this space’s settings.
“Not Found” (404) for a private repo That repo wasn’t chosen under Repository access. Edit the token on GitHub and add the repo.
The bot can read but can’t push (403) Set Contents to Read and write on the token.
It stopped working after a while The token probably expired. Make a new one (Part 1) and replace the key (Part 2).
An SSH address (git@github.com:...) doesn’t work Bash changes it to HTTPS automatically. Using https://github.com/... also works.

Quick checklist


Home · Next: Let the bot create gists →