Servers and accounts
Sign in with GitLab or GitHub (OAuth sign-in)
6 min read
Instead of creating a personal token and pasting it into Git servers, you can sign in to your account through the browser, as on any website. The sign-in happens on GitLab's or GitHub's own page, where your company's SSO applies. Versora receives a token, keeps it in the Windows vault and renews it on its own.
Sign-in works:
- on GitLab: in the browser (recommended) or with a code (GitLab 17.2 or later);
- on GitHub: with a code.
You need a client ID, the identifier of the OAuth application that the administrator registers once on the server (see the "For the administrator" section at the end of this page). It may come prefilled by the company policy.
- Preferences (Ctrl+,) › Accounts: Sign in with GitLab… and Sign in with GitHub….
- Git servers: Sign in with GitLab… (or Sign in with GitHub…, depending on the type chosen in the form). Tooltip: "OAuth sign-in to GitLab: no personal access token, with your organization's SSO".
- Palette (Ctrl+P): "Sign in with GitLab…" and "Sign in with GitHub…" (detail: "OAuth sign-in in the browser, no personal access token").
- In a server's account list (Preferences › Accounts): Sign in with GitLab to add an account, and Sign in again on an account whose sign-in expired or was revoked.
- In the credential error notices of the MERGE REQUESTS section: Sign in again.
- Open Sign in with GitLab. The dialog explains: "You sign in in your browser, on the GitLab page: your organization's SSO applies, and you don't need a personal access token. The token is kept in the Windows credential vault and renewed automatically."
- Choose GitLab (if the dialog shows the service choice).
- In Server, type the host (for example,
gitlab.empresa.com.br). - If you want, fill in Nickname (optional), such as "Work".
- In OAuth application client ID, paste the client ID the administrator gave you. With the company policy, it comes prefilled and locked ("Set by your organization's policy.").
- Leave Remember this server's client ID checked so you don't have to type it again.
- In How to sign in, choose In the browser (recommended).
- Click Sign in with GitLab.
- The browser opens the GitLab sign-in page. Sign in and authorize Versora. The dialog shows "Waiting for confirmation in the browser…" and continues on its own when the browser comes back to the app.
- At the end you see "Account ana added on gitlab.empresa.com.br (it's the server's default)."
Use code sign-in when the browser can't get back to Versora: another computer, remote desktop, a browser in a virtual machine.
- In the dialog, choose With a code (on GitHub, it's the only way: "On GitHub, you sign in with a code: you confirm a short code on the GitHub page.").
- Click Sign in with GitLab (or Sign in with GitHub).
- The dialog shows the code, with the Copy the code button: "We opened the GitLab confirmation page in your browser. Sign in (your organization's SSO applies) and enter this code:"
- Below it, "Page: https://gitlab.empresa.com.br/oauth/device (opens another site). The code is valid until 15:42." On another computer, open that address and enter the code.
- When you confirm, the dialog finishes on its own.
| Option | What it does | Default |
|---|---|---|
| Server | GitLab or GitHub host. | github.com when you choose GitHub |
| Nickname (optional) | Account name in the lists ("Personal", "Work"). Up to 40 characters. | empty |
| OAuth application client ID | The application's "Application ID" (GitLab) or "Client ID" (GitHub). It isn't a secret. | the saved one or the one from the policy |
| Remember this server's client ID | Saves the client ID for the next sign-in. | checked |
| How to sign in | In the browser (recommended) or With a code. | browser on GitLab, code on GitHub |
- Copy link: copies the sign-in address, to open it manually.
- Open the browser again (or Open the page again, in code sign-in).
- Cancel sign-in: gives up. You see "Sign-in canceled."
- If the browser doesn't open: "The browser didn't open (…). Use "Copy link" and open the address manually."
- If browser sign-in fails, the dialog offers Try with a code.
- The token is kept in the Windows vault, never in a file. It is renewed on its own before it expires; the account shows "OAuth sign-in, renewed automatically (the current token is valid until 15:42)." in Preferences › Accounts.
- The account goes into Git servers and starts working for Git over HTTPS and for the integrations, like a regular token.
- GitLab sign-in requests the
apiscope (which also covers Git over HTTPS). On GitHub,repoandread:org. - Exporting settings doesn't take the OAuth sign-in along: after importing, sign in again ("… used OAuth sign-in, which isn't included in the file: sign in again in Preferences › Accounts.").
In Preferences › Accounts, the remove button of an OAuth account opens Sign out of ana: "Versora's access is revoked on gitlab.empresa.com.br (when the server allows it) and the token is removed from the vault." Confirm with Sign out.
- Revoked: "You signed out of ana: the server revoked Versora's access."
- On GitHub: "You signed out of ana in Versora. To revoke access on GitHub too, go to Settings › Applications › Authorized OAuth Apps."
- Without confirmation from the server: the notice explains where to revoke it in the server profile.
The For administrators: register the OAuth application block, in the dialog itself, has the step by step.
GitLab
- As an administrator: Admin › Applications › New application (instance application). A group application also works: Group › Settings › Applications.
- Name: Versora. Redirect URI:
http://127.0.0.1/callback. - Clear "Confidential" (Versora is a desktop app and uses PKCE, with no secret).
- Scopes: check "api". "Trusted" is optional: it skips the authorization screen.
- Save and give the "Application ID" (client ID) to people, or distribute it through the company
policy (key
oauth_client_ids). Code sign-in (GitLab 17.2+) uses the same application.
GitHub
- Settings › Developer settings › OAuth Apps › New OAuth App (in the organization, for the company).
- Check "Enable Device Flow". The Authorization callback URL isn't used by Versora (it can be
http://127.0.0.1/callback). - Give the "Client ID" to people. It isn't a secret, and Versora doesn't use the client secret.
For IT
With the oauth_client_ids policy key (host=client_id pairs, for example gitlab.empresa.com.br=3f9c…), the client ID appears prefilled and locked for everyone. Saved client IDs are listed in Preferences › Accounts › OAuth client IDs, with the "set by your organization" badge when they come from the policy. See Administrators.
Sign-in isn't part of Ctrl+Z. To remove the account, use Sign out in Preferences › Accounts.
- "If the browser shows a redirect URI error, the OAuth application needs the address http://127.0.0.1/callback (opens another site): contact your administrator or sign in with a code."
- "The browser didn't come back to Versora in time…": the same redirect URI problem. Use code sign-in.
- "gitlab.empresa.com.br didn't accept the client ID: the OAuth application doesn't exist on that instance, was removed, or is marked as confidential…": check the client ID with the administrator.
- "The OAuth application on gitlab.empresa.com.br doesn't grant the "api" scope…": the administrator needs to check the scope on the application.
- "This instance (16.11) doesn't support signing in with a code (it needs GitLab 17.2 or later).": use browser sign-in.
- "Device code sign-in (device flow) is turned off for the OAuth application on github.com…": whoever manages the application needs to turn on "Enable Device Flow".
- "The code expired before it was confirmed. Start the sign-in again."
- "Sign-in to gitlab.empresa.com.br was denied (in the browser or by the server)."
- "gitlab.empresa.com.br asked to confirm the code at another address (…). For security, the sign-in was stopped."
- "The sign-in for ana on gitlab.empresa.com.br is no longer valid: access was revoked… Sign in again in Preferences › Accounts.": use Sign in again.
- "Invalid client ID: use only letters, digits, period, hyphen, underscore and tilde."
- Preferences › Accounts: the accounts, Sign in again, Make default and the saved client IDs.
- Company policy:
oauth_client_ids;allowed_serversalso applies to sign-in.