UneloraDocs
Connected apps

GitHub sign-in

How Unelora signs in to GitHub for its own git and GitHub actions, what GitHub shows, and how to revoke it.

Unelora can sign in to GitHub once, so the server can clone, push and open pull requests for your bots. Nothing has to be registered first: Unelora uses GitHub's own command line tool, GitHub CLI, and its device-code sign-in.

How the sign-in works

  1. You start the sign-in. Where GitHub CLI is not installed, as on a Unelora Cloud or a computer without it, the first sign-in first downloads it (about 15 MB). Unelora checks the download against the release it pins before anything runs.
  2. Unelora shows a one-time code, such as ABCD-1234, and the address https://github.com/login/device.
  3. Open that address, sign in to GitHub if asked, type the code and approve the request.
  4. Unelora shows Signed in as your GitHub username.

The code is good for 15 minutes. If it expires or you cancel, start again for a new code.

What GitHub shows

GitHub lists the grant as GitHub CLI under your account's authorized OAuth apps. It asks for the same scopes GitHub CLI always asks for:

  • repo: your repositories, including private ones
  • read:org: which organizations and teams you belong to
  • gist: your gists

Unelora asks GitHub for a sign-in that does not expire, and GitHub normally gives one. If GitHub gives a sign-in that expires instead, GitHub CLI renews it whenever Unelora uses it. Either way it works until you revoke it on GitHub or sign out in Unelora.

Where the sign-in is kept

  • Unelora Cloud and self-hosted servers. Each sign-in has its own private folder in the server's data folder. Where bots run in their sandbox, as on every Unelora Cloud, that folder is never inside it. The folder is never part of a backup, so a Cloud restored from a backup or moved to another server starts without the sign-in: sign in again there. The server uses the token for git and GitHub actions on the bots' behalf and never hands it to a bot.
  • Team Cloud. Each member signs in with their own GitHub account. Nobody can use another member's sign-in.
  • This computer. If you already signed in with GitHub CLI yourself (gh auth login), Unelora shows signed in via GitHub CLI and asks nothing more. Unelora reads that sign-in and never changes it. To sign out of it, run gh auth logout in your own terminal.

On Windows, GitHub CLI keeps sign-ins in Windows Credential Manager, which Unelora cannot keep separate. So on Windows Unelora starts its own sign-in only when your own GitHub CLI says it is signed out, or when Credential Manager holds no GitHub CLI entry at all. Otherwise it asks you to paste a token instead.

Using a token instead

You can paste a fine-grained personal access token instead of using the code. Create one at https://github.com/settings/personal-access-tokens, give it access to the repositories your bots should work on, then paste it into Unelora. Unelora checks the token with GitHub once and keeps it in its encrypted Vault on this server. Like a GitHub CLI sign-in, the token is never shown back and never reaches a bot.

Signing out and revoking

Signing out in Unelora deletes the sign-in from the server. It does not revoke the sign-in on GitHub. To cut off access completely:

  1. Open https://github.com/settings/applications and choose Authorized OAuth Apps.
  2. Select GitHub CLI, then Revoke.

Revoking also signs out every other copy of GitHub CLI you signed in with that account, on any computer. For a pasted token, delete it at https://github.com/settings/personal-access-tokens.

On this page