Skip to content
Skip to Content

Git accounts

Connect your organization's GitHub, GitLab, Gitea, Forgejo and Bitbucket accounts, or any Git repository over SSH or HTTPS, and how OpenPanel checks and keeps them.

Git accounts are where your services' code comes from. An organization adds as many as it needs, of any kind, and every member sees them. A service built from Git names one of these accounts and a repository it can read, and each deploy clones it with the account's credentials. See Deploy from Git.

Most of this page is about the organization's accounts. A member's own Git account is described below.

Kinds of accounts

KindForCredentialsPage
GitHubgithub.com or GitHub Enterprise ServerPersonal access tokenGitHub
GitLabgitlab.com or your own GitLabPersonal access tokenGitLab
GiteaYour own GiteaAccess tokenGitea and Forgejo
ForgejoYour own Forgejo, or CodebergAccess tokenGitea and Forgejo
BitbucketBitbucket CloudAtlassian account email and API tokenBitbucket
Git over SSHOne repository on any Git serverA deploy key OpenPanel makesAny Git server
Git over HTTPSOne repository on any Git serverUsername and password or token, or none for a public repositoryAny Git server

A Git server inside your private network can be reached through it: see Private Git servers.

Add an account

Open Git accounts

In the console, open Organization settings and the Git accounts tab, and choose Add Git account. Only the Owner and Admins can add accounts.

Choose the kind

Choose a tile under Git services or Any Git server.

Fill in the fields

  • Name: how the account appears in OpenPanel, up to 60 characters. Left empty, it is named after the address.
  • Address or Repository URL, where the kind needs one.
  • Reached through the private network, for a Git server inside your private network.
  • The token, password or email the kind asks for. The dialog links to the page where the token is made, and names the scopes to tick.

Add it

Choose Add account (or Make the key for Git over SSH). OpenPanel checks the account straight away:

  • GitHub, GitLab, Gitea, Forgejo and Bitbucket accounts are saved only when the check passes. If it fails, the console says why and "Nothing was saved."
  • Git over HTTPS is checked the same way.
  • Git over SSH is saved with its new deploy key even before the host accepts it, because you can add the key to the repository only afterwards.
  • An account reached through the private network with no ready server to check from is saved as Not checked.

The list

Each account shows its name and kind, a Private network tag if it is reached that way, the login and picture of the token's user (or the repository URL), and what the last check found, for example "12 repositories" or "Default branch main · 14 refs".

StateWhat it means
WorkingThe last check passed.
FailedThe last check failed. The reason is shown under the account.
WaitingChecked, but waiting for you: add the deploy key to the repository, then check again.
Not checkedNever checked, for example because no server was ready to check from.
ActionWho
Repositories (or Branches for a one-repository account): what the account can read, most recently updated firstEvery member
Check againOwner and Admins
Rename: only the name in OpenPanel changesOwner and Admins
Deploy key: shows a Git over SSH account's public key againOwner and Admins
RemoveOwner and Admins

To change an account's token or password, remove the account and add it again.

Use an account for a service

A service names the account by its ID. List the organization's accounts with their IDs:

openpanel git
LABEL             PROVIDER  URL                             STATUS  ID
git/git (public)  https     https://github.com/git/git.git  ok      508f98d2-cfa4-4f8f-a2f9-d8e4a4225a08

Then give a service the account, the repository and the branch, for example openpanel services create web --project shop --repo acme/web --git-account <id> --branch main. See Deploy from Git. To deploy on every push, see Push to deploy.

When a deploy clones the repository, the account's token, password or key travels to the server sealed, and is opened only on its way to the agent that builds. See How builds work.

How OpenPanel keeps them

  • Tokens, passwords and private keys are encrypted as soon as they arrive, and never shown again, not even to an Admin. The only thing shown again is a Git over SSH account's public deploy key.
  • Requests from OpenPanel go only to public addresses. A host that resolves to a private address is refused, with a hint to use the private network. Requests follow no redirects and stop after 10 seconds.
  • SSH host keys are pinned at the first check. A Git server that later answers with another key is refused.
  • Checks are limited to ten per organization in ten minutes, and repository lists to thirty, so the page cannot be used to hammer a host or try tokens.

A member's own Git account

Besides the organization's accounts, each member who can deploy may add Git accounts of their own, for repositories that are theirs rather than the organization's, such as their own GitHub account. They are listed under Your own accounts on the Git accounts tab.

  • Add one with Add your own account: the same kinds and fields as above.
  • Only its owner sees it and can choose it for a service. When they add a service from Git, it appears marked Yours in the account list.
  • A service set up with one keeps it when someone else changes the service's other settings, and its deploys use it. It builds only a repository its owner chose.
  • It is deleted when its owner leaves or is removed from the organization, with the token OpenPanel held for it.

Members who can only view the organization cannot add one. The API and the CLI list Git accounts but do not add them, and their list shows the organization's accounts only.

Remove an account

In the account's menu, choose Remove and confirm. OpenPanel forgets the account and deletes what it kept encrypted. Nothing changes at the Git service: revoke the token there too if nothing else uses it, or remove the deploy key from the repository so it stops working.