Skip to main content

Overview

The Gitar YouTrack integration connects a YouTrack instance, YouTrack Cloud or self-managed, to your pull requests. Gitar reads issues, creates and updates them, comments, and moves them between states.
YouTrack Cloud and self-managed YouTrack use the same two fields: a base URL and a permanent token. For YouTrack Cloud, enter https://your-company.youtrack.cloud.

Read Linked Issues

Resolve a PROJ-123 reference from a PR title, description, or branch name

Validate Against the Issue

Judge a PR against the objectives its issue asks for

Create and Update

Open follow-up issues and update existing ones from a rule

Comment and Transition

Post back to an issue and move it to a new state

Before you start

You need an organization admin role in Gitar to manage integrations. Your Gitar plan must include connecting YouTrack. See Plans. In YouTrack, you need permission to create the service account and grant it access to the intended projects. Connecting YouTrack and running YouTrack actions through Gitar are separate capabilities. Requests to read or search issues, create or update issues, add comments, or change issue states require Enterprise, whether they come from a PR comment, repository rule, or skill. The service account’s effective permissions and issue visibility restrictions still apply. YouTrack Cloud does not require the self-managed infrastructure checks below. Enter your tenant URL and continue to Connect YouTrack. Self-managed, check your instance against two requirements:
  • HTTPS on port 443 with a publicly trusted certificate. A self-signed certificate does not work.
  • Reachable from Gitar. If you enforce an inbound allowlist, add Gitar’s public IP addresses.
YouTrack needs no outbound access to Gitar. No webhook is registered, so traffic runs one direction: Gitar reaching your instance on 443. If your instance is served under a context path, enter the whole base URL including it, for example https://tools.your-company.com/youtrack.

Connect YouTrack

1

Create a service account

Gitar acts as a dedicated user, so its activity stays attributable and survives staff changes.
  1. In YouTrack, open Administration → Access Management → Users
  2. Click New user, then Create user
  3. Complete the account details for a dedicated gitar-service account and click Create
2

Give the account a project role

A YouTrack permanent token carries its user’s permissions. Grant access through the service account’s project roles.
  1. Open each project Gitar should work with
  2. Open Settings → People. Some versions label this page Access.
  3. Click Add people and select gitar-service
  4. Turn off Add to team to assign a role directly
  5. Under Roles, select Contributor for issue updates, or the custom read-only role described below for read-only use, then click Invite
For read-only access, confirm that no other direct or inherited role grants write permissions.Contributor permits issue creation, updates, comments, and state changes. Upgraded installations may retain Developer or custom roles. Check their permissions rather than relying on the role name.For read-only use, ask a YouTrack administrator to create a project role with Read Issue, which also grants Read Project Basic. Add Read Issue Comment if Gitar needs to read comments. The default Observer role alone does not grant issue access.Review permissions inherited through groups, teams, and broader role assignments. Issue and comment visibility restrictions can further limit what the account can read.
3

Generate a permanent token

  1. Sign in as gitar-service
  2. Open Profile → Account Security
  3. Under Tokens, click New token and name it gitar
  4. Select the YouTrack scope. YouTrack Administration alone does not permit issue access.
  5. Click Create token, then Copy token before closing the dialog
YouTrack shows the token once. Permanent tokens do not expire. Store the token securely and rotate it according to your organization’s policy. If your installation uses an external Hub, manage the token in the service account’s Hub profile.
4

Connect YouTrack in Gitar

  1. Go to your organization’s Settings in the Gitar dashboard
  2. Open the Integrations section
  3. Find the YouTrack card under Ticketing & Documentation and click Connect
Enter the two values:Wait for the automatic check. Token accepted and Can read a project confirm that the account authenticates and can see at least one project. Click Connect and confirm that the card shows Connected.The check does not prove access to a particular issue or permission to update it. If Gitar says Could not check the credentials. You can still save., saving alone does not verify access.

Using YouTrack in rules

Name YouTrack explicitly in a custom rule. Include the issue key or project, the action to perform, and the event that should trigger it. Gitar can read and search issues, list a project’s issues, create and update issues, post comments, and change issue states. See Rules for rule setup and supported triggers. Changes in YouTrack do not trigger Gitar runs. Choose a pull-request event for the rule. Search uses YouTrack’s query language. In a query such as #Unresolved Assignee: me, me means the service account whose token Gitar uses. Results match that account’s access, which may differ from your own YouTrack session. Functional validation needs no custom rule. It requires Enterprise, a private repository, and Validate PRs against linked issues enabled under Settings → Configuration → Behavior. Use a linking phrase such as Fixes PROJ-123 in the PR description. A passing mention such as see PROJ-123 does not link the issue. Expand Verification → Functional validation in Gitar’s dashboard comment to inspect objective coverage. See Functional Validation for the complete linking rules and limits.

Verify access

The PR-request and rule-based checks below require Enterprise. A successful connection or credential check does not establish that these agent actions are available on your plan. Verify issue reads and updates separately before enabling rules broadly. In Settings → Integrations, open YouTrack with Configure and wait for the automatic check. Confirm that the expected account and a visible project appear. Use a disposable issue created by someone other than gitar-service. This tests access to another user’s issues. Record its original summary. Replace PROJ-123 in the examples with that issue’s key.

Check issue reads

Create .gitar/rules/youtrack-read-check.md on a test branch:
Commit and push the rule on a test branch, then open a PR titled [YouTrack access check] Read. Expand Verification in Gitar’s dashboard comment to inspect the recorded actions. Confirm that the requested PR comment matches the issue in YouTrack.

Check issue updates

After the read succeeds, create .gitar/rules/youtrack-update-check.md on the same test branch:
Commit and push this rule while the PR still has its Read title. Change the title to [YouTrack access check] Update to trigger evaluation. Inspect Verification and the result comment, then confirm the changed summary in YouTrack. A successful read does not establish update access. A successful summary update does not verify commenting, issue creation, or state changes. Test the additional actions your workflow needs separately.

Clean up

Change the PR title to [YouTrack access check] Complete. Restore the original issue summary in YouTrack, remove both temporary rule files, and close the test PR without merging the verification rules.

Best practices

Start with limited access and verify the actions your rules will perform.
  • Use a dedicated account and restrict its effective access to the intended projects.
  • Start with one project. Verify issue reads and updates separately before enabling rules broadly.
  • Name the issue, field, and intended value in update rules. For transitions, include the project’s state-field name and exact target state.
  • Keep requirements in the issue description clear enough for functional validation to assess.
  • Keep searches focused on a project. Use an explicit assignee when the rule should find someone other than the service account.
  • Store tokens securely and rotate them according to your policy. Never place them in rule files or PR comments.

Manage the connection

To rotate the token, create a replacement in the service account’s YouTrack profile with the YouTrack scope. In Gitar, open Settings → Integrations → YouTrack → Configure, enter it in Permanent Token, wait for the check, and click Update. Verify access before deleting the old token in YouTrack. Leave the token field blank when changing other settings to keep its existing value. To stop using the integration, open Configure, click Disconnect, and confirm. Disconnecting Gitar does not revoke the YouTrack token. Delete the token in YouTrack separately if it is no longer needed.

Frequently Asked Questions (FAQ)

Yes. Enter your tenant URL, for example https://acme.youtrack.cloud, and mint the permanent token the same way, under the service account’s profile. No separate API host to enter.
Yes. Use a project role that grants Read Issue without issue creation, update, or comment-creation permissions. Add Read Issue Comment if required. Observer alone does not grant issue access. Review inherited permissions and verify the restrictions with a test issue.
Gitar uses the service account’s effective permissions, including access inherited through groups, teams, and broader role assignments. Review these in YouTrack. Issue and comment visibility restrictions still apply.The connection check confirms at least one visible project, not access to every intended issue.
Yes. Automatic issue linking and functional validation assign bare keys such as PROJ-123 to the first connected tracker in this order: Jira, Linear, Plane, then YouTrack. A failed lookup does not try the next tracker.Use a custom rule that explicitly names YouTrack for YouTrack actions. This does not change which tracker functional validation selects.
No. Gitar writes issue bodies and comments as markdown, and YouTrack renders it.
No. YouTrack permanent tokens do not have an expiration date. A deleted token, disabled account, changed permissions, or missing YouTrack scope can still prevent access. Follow Manage the connection to replace a token.
Gitar accepts HTTPS only, with no exception for a hostname on your internal network. A trailing /api is fine and is trimmed for you.
Check that the full token was copied and has not been deleted. Its scope must include YouTrack, not only YouTrack Administration. Use a dedicated account rather than the built-in guest account.If no projects are visible, review the account’s project permissions. For connectivity failures, check the base URL, context path, certificate, and network allowlist.
First confirm that your Gitar organization has Enterprise. Reconnecting the integration or granting broader permissions does not remove this plan requirement.Confirm the issue key and Read Issue permission in that project. Check the issue’s visibility restrictions and the service account’s group membership.If comments are missing, also check Read Issue Comment and comment visibility. Seeing a project does not establish access to all its issues.
First confirm that your Gitar organization has Enterprise. Reconnecting the integration or granting broader permissions does not remove this plan requirement.Reading, commenting, creating, and updating require different permissions. Check Update Issue for field updates and Create Issue Comment for comments.For state changes, confirm the state-field name, allowed value, and project workflow requirements. Test the failing action on a disposable issue.
Gitar can create an issue successfully, then fail to set its assignee, priority, or state. If the error includes a created issue key, open that issue in YouTrack and check its fields.Correct the rejected value or permission, then ask Gitar to update that issue. Repeating creation can produce a duplicate.
Confirm that the issue is readable, the repository is private, and functional validation is enabled on Enterprise. Check the linking phrase and whether another connected tracker takes precedence.See Functional Validation for the complete requirements.