megalinter icon indicating copy to clipboard operation
megalinter copied to clipboard

AzureCommentReporter.py permission issues on Azure DevOps

Open dkiziridis opened this issue 1 year ago • 2 comments

Hello,

I'm opening this Issue to get some guidance. In the past I was able to solve it by granting appropriate permissions to "Project Collection Build Service Accounts" in Azure DevOps Repositories.

But this time the permissions are in place and the error keeps showing up.

Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/megalinter/run.py", line 14, in linter.run() File "/megalinter/MegaLinter.py", line 288, in run reporter.produce_report() File "/megalinter/reporters/AzureCommentReporter.py", line 101, in produce_report existing_threads = git_client.get_threads( ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/azure_devops-6.0.0b4-py3.12.egg/azure/devops/released/git/git_client_base.py", line 1482, in get_threads File "/usr/local/lib/python3.12/site-packages/azure_devops-6.0.0b4-py3.12.egg/azure/devops/client.py", line 104, in _send File "/usr/local/lib/python3.12/site-packages/azure_devops-6.0.0b4-py3.12.egg/azure/devops/client.py", line 68, in _send_request File "/usr/local/lib/python3.12/site-packages/azure_devops-6.0.0b4-py3.12.egg/azure/devops/client.py", line 270, in _handle_error azure.devops.exceptions.AzureDevOpsServiceError: TF401019: The Git repository with name or identifier <repository ID> does not exist or you do not have permissions for the operation you are attempting.

Group permissions: image

Has anyone else encountered this and if yes, how did you solve it ?

Thank you.

dkiziridis avatar Jul 18 '24 11:07 dkiziridis

  • Did you create the build policy ?

https://learn.microsoft.com/en-us/azure/devops/repos/git/branch-policies?view=azure-devops&tabs=browser#build-validation

  • Can you confirm that SYSTEM_ACCESS_TOKEN is well sent to MegaLinter ?

https://megalinter.io/latest/reporters/AzureCommentReporter/#configuration

As far as I know, we changed nothing about Azure Reporter for a while :/

@EtienneDeneuve maybe you have an idea ?

nvuillam avatar Jul 18 '24 21:07 nvuillam

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

github-actions[bot] avatar Aug 18 '24 01:08 github-actions[bot]