I have a private Maven repo in my BitBucket account that I had been using for years until I let that project slide. I wanted to do more work on it but I found that the 1.0 API had changed. I figured out the new 2.0 API URL but now Maven will not connect.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.014 s
[INFO] Finished at: 2021-08-20T17:31:34-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project hanfastolfe-accounts: Could not resolve dependencies for project com.hanfastolfe:hanfastolfe-accounts:jar:2.1.0-alpha: Failed to collect dependencies at com.hanfastolfe:hanfastolfe-misc:jar:1.0.0: Failed to read artifact descriptor for com.hanfastolfe:hanfastolfe-misc:jar:1.0.0: Could not transfer artifact com.hanfastolfe:hanfastolfe-misc:pom:1.0.0 from/to han_fastolfe_maven_repository_releases (https://api.bitbucket.org/2.0/repositories/Bytor/maven_repository/src/releases): Authorization failed for https://api.bitbucket.org/2.0/repositories/Bytor/maven_repository/src/releases/com/hanfastolfe/hanfastolfe-misc/1.0.0/hanfastolfe-misc-1.0.0.pom 403 Forbidden -> [Help 1]
I have verified that with curl -u … I can download the files using the same credentials set in my ~/.m2/settings.xml file for Maven.
What do I need to do to make sure that Maven can once again download artifacts?
Hi @Bytor
Thank you for reaching out to the community.
Would it be possible for you to confirm how you're using the credentials from ~/.m2/settings.xml?
Are you currently using environment variables?
You can also try to do a Curl command before your build command to see if Curl will also work on Pipelines or not.
Apart from that, I'd also recommend testing your Pipelines build locally in a Docker container to compare if it works there or not.
Ideally, if it works locally in a Docker container, it should also work on Pipelines.
Let me know how it goes.
Regards,
Mark C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.