Skip to content
Versora

Manual

Servers and accounts

Multiple accounts on the same server

5 min read

On this page

Many people have more than one account on the same server: a personal one and a work one on github.com, or a service account next to their own on the company's GitLab. Versora keeps several accounts per server and uses the right one in each repository, on its own.

The choice applies to the GitLab/GitHub screens (merge requests, review, pipelines, issues) and to fetch, pull and push.

Which account applies in each repository

For each remote of the repository, Versora decides in this order:

  1. the one chosen manually for that repository;
  2. otherwise, the one that owns the remote: the account whose username owns the project, or the one that belongs to the group that owns the project;
  3. otherwise, the server's default.

When two accounts belong to the group that owns the project, the default is kept ("accounts ana, ana-trabalho belong to equipe; the default was kept").

Tip

If the remote URL includes a user (for example, https://[email protected]/equipe/app.git), Git uses that user's account for fetch, pull and push. The choice on the screen still applies to the server screens.

Where to find it

  • Preferences (Ctrl+,) › Accounts: all the accounts of all servers.
  • Palette (Ctrl+P): "Server accounts" (detail: "Several accounts per server, OAuth sign-in, default account") and "Account for this repository…" (detail: "Which account fetch, pull, push and the server screens use").
  • MERGE REQUESTS section: the badge of the account in use, next to Mine/All, when the server has more than one account. Clicking it opens Account for this repository.
  • Git servers: Accounts….

The Preferences › Accounts screen

Server accounts

Each server shows the list of its accounts. For each account:

  • the default badge (the server's default account) and OAuth or Token;
  • the sign-in state: "OAuth sign-in, renewed automatically (the current token is valid until 15:42).", "OAuth sign-in, valid until 30/11/2026 18:00 (no automatic renewal).", "OAuth sign-in (the token doesn't expire).", "Personal access token.", or a problem ("The sign-in was revoked or expired: sign in again.", "No token: enter this account's token.");
  • the groups the account belongs to ("Groups: equipe, plataforma and 3 more"), used to pick the account that owns the remote.

Buttons on each account:

ButtonWhat it does
Sign in againRedoes the OAuth sign-in of a revoked or expired account.
Enter tokenAsks for the token of an account that has no credential.
Make defaultMakes this the server's default account.
VerifyChecks with the server whether the sign-in is valid ("The sign-in is valid: the server recognizes the user ana.").
Refresh ana's groupsReloads the account's groups from the server.
ana's nicknameGives the account a nickname ("Personal", "Work").
Remove the account ana / Sign out of anaRemoves the account from the vault (and revokes the OAuth sign-in on the server).

Below each server's list:

  • Sign in with GitLab (or Sign in with GitHub): adds an account through OAuth sign-in (see Sign in with GitLab or GitHub).
  • Account with token: adds an account with a personal token.

At the top of the screen are Sign in with GitLab…, Sign in with GitHub… and Git servers….

Account for this repository

With a repository open, the screen shows the Account for this repository (app) block, the same as the dialog described below.

Manual choices

Lists the repositories where you chose the account manually, with Back to automatic on each one. With no choices: "None: every repository uses the automatic account."

OAuth client IDs

The OAuth application client IDs saved at the last sign-in on each server, with Forget the client ID for gitlab.empresa.com. The ones that come from the company policy show "set by your organization" and take precedence over the saved one.

Adding an account with a token

  1. In Preferences › Accounts, on the server, click Account with token.
  2. The Another account on github.com dialog explains: "One more account on the same server (for example, your work account next to your personal one). The token is kept in the Windows credential vault. Each repository's account is picked by the remote's owner, or manually."
  3. Fill in Username, Personal access token and, if you want, Nickname.
  4. Click Add account. You see "Account ana-trabalho added on github.com."

Choosing a repository's account manually

  1. Open Account for this repository… from the palette, or click the account badge in the MERGE REQUESTS section.
  2. The Account for this repository (app) dialog explains: "Which account Versora uses for each remote of this repository, for fetch, pull and push and on the server screens (merge requests, review, pipelines)."
  3. For each remote, in Account on github.com, choose the account, or Automatic — now: ana to let Versora decide.
  4. Below the selector, a line explains why that account applies, for example "Using ana-trabalho: owns the remote (empresa-sa)."
  5. The change takes effect immediately: "origin now uses the account ana-trabalho."

With a single account on the server, the dialog says "Only one account on github.com: ana." With no remote for a registered server: "No remote in this repository points to a server you've added."

What Versora does in git

For fetch, pull and push, Versora's credential helper hands Git the username and token of the account that applies to the remote. Your Git configuration doesn't change. See Git servers.

How to undo

Accounts and choices aren't part of Ctrl+Z. To go back, use Back to automatic or choose another account in the same dialog.

Caveats and messages

  • "The ana-trabalho account (the one used for this repository) on github.com doesn't have a credential yet. Sign in again or enter the token in Preferences › Accounts."
  • "There's already another ana account on github.com. To use it as the default, choose "Make default" in Preferences › Accounts."
  • "The token belongs to ana, not to ana-trabalho. Check which token was entered for this account.": the pasted token belongs to another account.
  • "github.com rejected the token (401): it may be wrong, expired or revoked."
  • "This account signed in with OAuth as ana: the username can't be changed here. To use another account, sign in with it in Preferences › Accounts."
  • "Couldn't read the account's groups on gitlab.empresa.com (HTTP 403).": choosing by the remote's owner goes without that account's groups.
  • When removing a server's only account: "It's the only account: the server gitlab.empresa.com is removed from the server list."
  • Preferences › Accounts.
  • Company policy: oauth_client_ids (locked client ID) and allowed_servers. See Administrators.

See also