I created an azure artifact and add it to pom.xml and I configure ~/.m2/settings.xml in the agent machine with the token. and when I deploy locally it is work but when I use the maven task in the azure pipeline this error appears. user has all permissions
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0:deploy (default-deploy) on project my-server: Failed to deploy artifacts: Could not transfer artifact:pom:1.0 from/to artifact authorization failed for https://pkgs.dev.azure.com/, status: 403 Forbidden - User '7ba7a839-2613-4554-84a4-4aa2d4cf4162' lacks permission to complete this action. You need to have 'AddPackage'. (DevOps Activity ID: 46D5F76C-E82C-48C8-8D63-4269F3CE4F65) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
i try in windows it worked successfully but i use Linux centos7 as agent to run my pipeline