Skip to content

Git connections

A Git connection lets Nimzo read your repositories, commit changes to them and comment on their pull requests. Connect GitHub through the Nimzo GitHub App, and GitLab or Bitbucket with an access token.

To connect a provider, open Connections, select Connect provider under Git providers, then pick the provider. You need the Admin role.

Nimzo needs write access to your repositories and their pull requests. If you connected GitLab or Bitbucket with a read-only token, Test connection now fails for it: replace the GitLab token or the Bitbucket token with one that has the permissions below.

Nimzo connects to GitHub through the Nimzo GitHub App. You install it on a GitHub account or organization, and pick the repositories it can access. The app can read and write the contents and pull requests of those repositories. Nimzo stores no token: it asks GitHub for a short-lived one each time it needs it.

  1. Under Git providers, select Connect provider, then GitHub.
  2. On GitHub, pick the account or organization to install the app on, and the repositories it can access.
  3. Approve the installation. GitHub sends you back to Nimzo.

Nimzo checks that your GitHub account can access the installation, then shows GitHub connected. The connection is named after the GitHub account or organization.

If you are not an owner of the GitHub organization, GitHub sends the installation to an owner for approval, and Nimzo shows Installation waiting for approval. Once an owner approves it, connect GitHub again.

When the Nimzo GitHub App asks for a new permission, GitHub asks an owner of the account or organization to accept it. Until an owner accepts, Nimzo cannot read pull requests or write to the repositories of that installation.

Test connection checks that the Nimzo GitHub App is still installed, and not suspended.

Nimzo uninstalls its GitHub App from the account or organization.

  • “GitHub did not confirm your access to this installation. Install the app again.” The app was uninstalled or suspended on GitHub, or your GitHub account cannot access it. Disconnect the connection, then connect GitHub again.
  • “This GitHub installation belongs to another organization” Disconnect it from the other Nimzo organization first, then connect GitHub again.
  • “GitHub did not send an authorization code” The installation did not ask for your authorization. Connect GitHub again from Settings.
  • “Could not reach GitHub. Try again.” Select Connect provider again.

Nimzo connects to gitlab.com or to a self-managed GitLab instance with a project or group access token.

  1. In GitLab, create a project or group access token with the api and write_repository scopes, and copy it. Nimzo needs write_repository to push commits, and api to comment on merge requests: GitLab has no narrower scope for it.
  2. Under Git providers, select Connect provider, then GitLab.
  3. Leave GitLab URL as https://gitlab.com, or change it to the address of your self-managed instance. The address must be public and use HTTPS.
  4. Paste the token in Access token.
  5. Select Connect GitLab.

Nimzo checks the token and its scopes with GitLab, then stores it encrypted and never shows it again. The connection is named after the token. If the token has an expiry date, the list shows it under the connection’s name.

Test connection checks that GitLab still accepts the token, and that it still has the api and write_repository scopes.

Replace the token before it expires, or when it lacks a scope.

  1. In GitLab, create a token with the api and write_repository scopes for the same instance.
  2. In the connection’s actions, select Replace token.
  3. Paste the new token in Access token, then select Replace token.

Nimzo checks the new token and its scopes with GitLab, then uses it instead of the old one and shows Token replaced. The connection takes the name and expiry date of the new token. If GitLab refuses the token, Nimzo keeps the old one. Revoke the old token in GitLab.

Nimzo deletes the token it stored. Revoke the token in GitLab too.

  • “The provider did not accept this token. Check that it is valid, not expired, and has the required scopes.” Create a new token with the api and write_repository scopes, then replace the token.
  • “The token is missing permissions Nimzo needs. On GitLab, give it the api and write_repository scopes. On Bitbucket, give it Repositories: Write and Pull requests: Write.” The token has neither or only one of the scopes, for example read_api instead of api, or read_repository instead of write_repository. Create a new token with both, then replace the token.
  • “Nimzo could not reach a Git server at this URL. Check the URL.” Check the GitLab URL. A self-managed instance must answer at that address.
  • “Nimzo cannot connect to this URL. Use a public HTTPS address.” Nimzo only connects to GitLab instances reachable from the internet.

Nimzo connects to Bitbucket Cloud with a repository, project or workspace access token that can write to repositories and pull requests. Bitbucket checks a token against a repository, so you also give the URL of a repository the token can read.

Token Gives access to Bitbucket plan
Repository access token One repository Every plan
Project access token Every repository of one project Premium
Workspace access token Every repository of one workspace Premium

A repository access token covers only its repository: connect one token for each repository Nimzo works with. Personal Atlassian API tokens are not supported.

  1. In Bitbucket, create an access token with the Repositories: Write and Pull requests: Write permissions. For a repository access token, open the repository, then Repository settings > Security > Access tokens.
  2. Under Git providers, select Connect provider, then Bitbucket.
  3. In Repository URL, paste the address of a repository the token can read, such as https://bitbucket.org/acme/infra.
  4. Paste the token in Access token.
  5. Select Connect Bitbucket.

The Connect Bitbucket dialog, with a repository URL typed in

Nimzo checks that the token can read the repository and write to it and its pull requests, then stores it encrypted and never shows it again. The connection is named after the repository, as workspace/repository.

Test connection checks that the token can still read the repository the connection is named after, and still has the Pull requests: Write permission.

Replace the token when it lacks a permission, or before you revoke it.

  1. In Bitbucket, create a token with the Repositories: Write and Pull requests: Write permissions. It must be able to read the repository the connection is named after.
  2. In the connection’s actions, select Replace token.
  3. Paste the new token in Access token, then select Replace token.

Nimzo checks the new token against the connection’s repository, then uses it instead of the old one and shows Token replaced. If Bitbucket refuses the token, Nimzo keeps the old one. Revoke the old token in Bitbucket.

Nimzo deletes the token it stored. Revoke the token in Bitbucket too.

  • “The provider did not accept this token. Check that it is valid, not expired, and has the required scopes.” Check that you used a repository, project or workspace access token, not a personal Atlassian API token, and that it has not been revoked.
  • “The token cannot read this repository. Check the URL, and that the token has read access to it.” Check the repository URL, and that the token has the Repositories: Write permission on it.
  • “The token is missing permissions Nimzo needs. On GitLab, give it the api and write_repository scopes. On Bitbucket, give it Repositories: Write and Pull requests: Write.” The token has no Pull requests: Write permission, which Bitbucket ties to Repositories: Write. Create a new token with it, then replace the token.