Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Unable to access Bitbucket repository with Maven

Sebastian Perez Ferretti March 14, 2022

Greetings, I am working with Maven and i have a private repository in bitbucket for some of my libraries. The problem i have is, after the update to App passwords, Maven can´t access my repository anymore.

I tried to change the config in ~/.m2/settings.xml, doing something like this:

<server>
<id>example</id>
<configuration>
<httpHeaders>
<property>
<name>Authorization</name>
<!-- Base64-encoded "bitbucketuser:password" -->
<value>Basic xxx/value>
</property>
</httpHeaders>
</configuration>
</server>

where "xxx" is my Base64 encoded username:app_password. But it didn´t work. The message I obtain is: Not authorized , ReasonPhrase\:Unauthorized

Something im missing? Thanks!

 

1 answer

0 votes
Norbert C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 16, 2022

Hi @Sebastian Perez Ferretti 

Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you! 

Unfortunately I'm not familiar with Maven, but when I was reading about it, I found it out that there are two fields need to be added in the settings.xml file to be able to connect:

<properties>
  <project.scm.id>my-scm-server</project.scm.id>
</properties>
<settings>  
   <servers>  
      <server>
         <id>my-scm-server</id>  
         <username>myUser</username>  
         <password>myPassword</password>  
      </server>   
   </servers>
</settings>

Source: https://stackoverflow.com/questions/28282572/maven-release-plugin-git-credentials

Can you try to do the configuration as it's mentioned in this page and let me know if that helps?

I'm looking forward to hear from you.

Best Regards,
Norbert
Atlassian Bitbucket Cloud Support

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events