We are using gitlab.com, free account
I enabled maven repository in settings
I have in pom.xml
<distributionManagement>
<repository>
<id>gitlab-maven</id>
<url>https://gitlab.com/api/v4/projects/MY_PROJECT_ID/packages/maven</url>
</repository>
</distributionManagement>
In settings.xml
I have
<xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<id>gitlab-maven</id>
<configuration>
<httpHeaders>
<property>
<name>Private-Token</name>
<value>MY_ACCESS_TOCKEN</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
</settings>
Access tocken was created with “api” permissions
When I do maven deploy I get
Return code is: 401, ReasonPhrase: Forbidden.
What I’m doing wrong?