Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

403 error when Dependabot tries to create a pull request #1106

Open
semkeijsper opened this issue May 2, 2024 · 5 comments
Open

403 error when Dependabot tries to create a pull request #1106

semkeijsper opened this issue May 2, 2024 · 5 comments

Comments

@semkeijsper
Copy link

Describe the bug
Dependabot fails when trying to create a pull request

To Reproduce
Steps to reproduce the behavior:

  1. Run the pipeline with the Dependabot task
  2. The plugin access the code and checks all the packages
  3. It fails when trying to create a pull request

Expected behavior
It should create a pull request

Screenshots
image

Extension (please complete the following information):

  • Host: Azure DevOps
  • Version: 1.28.0.708 (Latest)

Server (please complete the following information):

  • Region: westeurope
  • Version: ?

Additional context
The plugin can access the code in the repository, so the API connection works. It can also do GET requests for fetching the existing pull requests. So the basic permissions work, but as soon as it tries a POST request, it fails.
We have tried all different options but cannot find where we can configure the permissions for this plugin, or for the 'user' that runs this plugin. The documentation of this plugin is unclear about where we can configure the required permissions.
We use minimal configs for dependabot and we use the standard Azure Pipelines agent pool. Please advice on where this goes wrong.

@ahmed-ben10
Copy link

I encountered a similar issue just a few days ago. To resolve it, ensure that your build service user has been granted the following permissions:

image

@semkeijsper
Copy link
Author

@ahmed-ben10 Thanks for your reply. How did you discover/find who your build service user is? And in what menu was that screenshot taken, Project settings, Organization settings, and which submenu? Thanks.

@sambouchard-newforma
Copy link

@ahmed-ben10 Thanks for your reply. How did you discover/find who your build service user is? And in what menu was that screenshot taken, Project settings, Organization settings, and which submenu? Thanks.

To find who your Build service user is, go to the dropdown menu on the right in the pipeline page and click on ''Manage security'' :
image
Here at the bottom of the list you will see under users who your build service user(s) is/are :

Then go to the permissions tab of the Azure DevOps project settings in the users section you will most likely find the user that you found previously. From here on, you can either modify its permission or add the user to be the member of a group that has the correct permissions!

@semkeijsper
Copy link
Author

@sambouchard-newforma Unfortunately none of the users listed in the Pipeline dropdown can be found in the Permissions > Users tab... thanks for the reply though :)

@mburumaxwell
Copy link
Contributor

Check #1095 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants