Skip to content

Using a Personal Access Token

Some users have trouble with the OAuth token. Some companies have rules that do not allow an OAuth token. For these cases, Git-Zen lets you use a personal access token (PAT) instead.

This option is available for GitHub, GitLab, and Azure DevOps. You create the token on your platform, then add it to Git-Zen.

GitHub offers “classic” and “fine-grained” personal access tokens. Both work with Git-Zen. We recommend the fine-grained token because it gives the best security and flexibility. For more information, see the GitHub documentation.

These steps create a fine-grained token.

  1. Log in to github.com.

  2. In the upper-right corner of any page, click your profile photo, then click Settings.

  3. In the left sidebar, click Developer settings.

  4. In the left sidebar, under Personal access tokens, click Fine-grained tokens.

  5. Click Generate new token.

  6. Under Token name, enter a name, such as “Git-Zen-Zendesk Integration”.

  7. Under Expiration, choose how long the token lasts. When the token expires, you must create a new one and update it in Git-Zen.

  8. Optional: under Description, describe the purpose of the token.

  9. Under Resource owner, choose the owner. The token can access only resources that this owner owns. Organizations appear only if they opted in to fine-grained tokens. See Setting a personal access token policy for your organization.

  10. Optional: if the owner is an organization that requires approval for fine-grained tokens, enter a justification for the request.

  11. Under Repository access, choose which repositories the token can reach. Choose the minimum you need. Tokens always include read-only access to all public repositories. We suggest you select only the repositories that you want to connect to Zendesk with Git-Zen.

  12. If you chose Only select repositories, pick them in the Selected repositories drop-down.

    Selecting repositories for the token
  13. Under Permissions, grant these permissions:

    Permission group Section Access
    Organization permissions Members Read
    Organization permissions Projects Read and write
    Repository permissions Metadata Read
    Repository permissions Issues Read and write
    Repository permissions Repository webhooks Read and write
  14. Click Generate token.

On the next screen, GitHub shows your token. Click copy. This is your only chance to copy it. If you miss it, you must create a new token.

The generated GitHub token with a copy button
  1. On the main Git-Zen screen, click the Webhooks menu button.
  2. Find the OAuth user section for your platform, for example “GitHub OAuth User”. Click Switch to Personal Access Token.
  3. Paste the token into the field that appears.
  4. Click Save Changes.
  5. Refresh your browser, or close the Zendesk ticket tab and open it again, to see the change.
The Webhooks icon on the Git-Zen menu bar (GitHub shown)
The OAuth user section with the personal access token option (GitHub shown)

You can replace the token in Git-Zen with a different one at any time.