GitHub Sync Guide

Last updated: 2026-09-22. Applies to Ubicon 0.3.0 and later.

GitHub sync is an optional feature of Ubicon. It keeps your icon assignments and custom icons in a private GitHub repository that you own, and every browser you connect stays in step through it. This page is the full reference: how it works, what the different tokens mean, what happens in every situation we could think of, and what to do when something goes wrong. If you only want to set it up, the wizard in Ubicon's options page walks you through it in about three minutes and you do not need to read any of this first.

What it is, and is not

Setting it up

Open Ubicon's options page (click the toolbar icon, then Set up GitHub sync, or right-click the icon and choose Options). The wizard has three steps. Each opens the right GitHub page with everything filled in that GitHub allows a link to fill in.

  1. Create your private repository. Click Open GitHub. The page is already filled in: the name ubicon-sync, a description, and Private selected. Click Create repository. The repository is copied from a small starter that contains only a README explaining what the repository is for.
  2. Create your access token. Click Open GitHub. The token's name, description, "No expiration" and the Contents permission (Read and write) arrive filled in. One thing GitHub cannot fill in from a link: under Repository access, change All repositories to Only select repositories and pick ubicon-sync. Then click Generate token and copy it. GitHub shows a token only once.
  3. Paste the token into Ubicon and click Connect. Your browser asks once for permission to talk to api.github.com; allow it. Ubicon then checks the token, finds your repository, confirms the token reaches nothing else, and uploads whatever this browser already has. The success screen shows a setup code for your other browsers.

If a check fails, the wizard turns that line into a fix card that says exactly what to change on GitHub. Your token stays in the field, so you fix it on GitHub and click Connect again. You never start over.

You need a GitHub account. A free one is enough. If you do not have one, the wizard's intro links to the sign-up page.

Tokens

The token is what lets Ubicon read and write your repository. Everything about who can do what to your synced icons comes down to which tokens exist and what each one is allowed.

Fine-grained, not classic

GitHub has two kinds of personal access token. Ubicon only accepts fine-grained tokens (they start with github_pat_), because only those can be limited to a single repository. A classic token (starting with ghp_) can only be granted to all of your repositories at once, so Ubicon refuses it and points you back to the token step.

Read and write, or read-only

The token's Contents permission decides what a browser can do:

Expiry

The wizard's link asks GitHub for a token with no expiration, so there is no yearly renewal to remember. If you would rather it expire, change the expiration on the GitHub page before generating it. Ubicon reads the expiry date from GitHub and shows a warning in the popup and the options page starting 14 days before. When a token expires, that browser keeps its icons and stops syncing until you paste a new token under Manage, Replace token.

Only select repositories

Ubicon refuses any token that can reach a repository other than ubicon-sync, with no way to override it. A token left on "All repositories" would let anyone holding it, or your setup code, read every private repository you own and write to all of them. The check works like this:

The one case Ubicon cannot tell apart at setup time is an account whose only repository is ubicon-sync with a token left on "All repositories": there is nothing else for the token to reach yet. The daily check catches it as soon as another repository exists.

Fixing a token without starting over

Editing a fine-grained token on GitHub keeps its value. If Ubicon refuses a token because it reaches other repositories, open your tokens on GitHub, open the token, click Edit, set Repository access to Only select repositories, pick ubicon-sync, click Update, and then click Connect in Ubicon again with the same token.

Several tokens at once

Tokens are independent. Creating a new token does not affect an old one, and disconnecting a browser changes nothing on GitHub. So if one browser uses an older token and you create a new one for another browser, both keep working. A browser only needs a new token when the token it holds is deleted on GitHub: it then reports "GitHub rejected the token", keeps its icons, and waits for Replace token.

If a token leaks

A token limited to ubicon-sync lets its holder read and change the icons in that repository and nothing else in your GitHub account. If you think one has leaked, delete it on GitHub. Every browser using it stops syncing at its next attempt and keeps its icons; give each a new token with Replace token. GitHub's history lets you see and undo any change that was made in the meantime (see What is in the repository).

View-only tokens

A token created with Contents set to Read-only gives a view-only browser. Read this section before using one, because it works differently from a normal connection in one important way.

View-only is for someone who should see your icons and never change them: a colleague who watches the console, or a second machine you want kept identical without any risk of an accidental edit. It is not for keeping a separate personal set of icons; use a normal connection or stay disconnected for that.

The setup code

The setup code is a single line starting with ubicon1. that bundles the repository name and the token, so another browser can join with one paste instead of the three wizard steps. It also carries the view-only flag when it comes from a view-only browser.

Multiple browsers

How syncing works

What is in the repository

Every sync is one commit, named for the browser that made it, so the repository's history shows what changed and when. Two things to know:

Disconnecting and cleaning up

Sharing with other people

Privacy and security

Troubleshooting

While connecting

While connected

Limits

Questions

Anything this page does not answer can be raised as an issue at github.com/tvirelli/Ubicon/issues.