Skip to content

Permissions and Error Handling

Info

Many problems arise due to missing authorizations and releases. It is therefore very important that you provide your pipeline with all the required authorizations.

Set up Permissions for Pipeline

  1. Go to the project settings page for your organization at Organization Settings > General > Projects.

Step 1

  1. Select the project you want to edit.

Step 2

  1. Within Project Settings, select Repositories. Select the repository you want to run the build task on.

  2. Select Security to edit your repository security.

Step 3

  1. Search for Project Collection Build Service. Choose the identity {{your project name}} Build Service ({your organization}) (not the group Project Collection Build Service Accounts ({your organization})). By default, this identity can read from the repo but can't push any changes back to it. Grant permissions needed for the build task. Typically you'll want to grant:

  2. Create branch: Allow

  3. Contribute: Allow
  4. Read: Allow
  5. Create tag: Allow

image

Set up Classic Pipeline

For the use of a classic pipeline with the Releae Notes for DevOps Build Task you need to enable the OAuth token.

To do so edit the pipeline, go to the settings of the "Run on agent" job, scroll down and enable the "Allow scripts to access the OAuth token" option. Once you have enabled this, the access token will be retrieved and the process should work.

image

Error Handling

If the pipeline return a Error, then please check if all needed permission were granted. If so check if the Error code is listed here otherwise search in the interent or contact our support.

Error TF401027

This error indicates, that the required permissions that are needed are not set. Please make sure that the correct build service have the needed permissions.

Error TF402455

TF402455: Pushes to this branch are not permitted; you must use a pull request to update this branch.

We have gathered the following points and kindly ask you to check them:

  • Check the project settings → Repositories policy. Make sure you do not have any policy to block push.
  • Open the branch policy and re-disable all policies, and ensure that there are no other policies blocking the push.
  • Verify the repositories permission and make sure your account has 'Force push' access.
  • If you are still experiencing this issue, please set the 'Bypass policies when pushing' option to 'Allow' for your account.

These information were found on the Microsoft Forum and could be helpful: https://developercommunity.visualstudio.com/t/tf402455-pushes-to-this-branch-are-not-permitted-y/1164589