Cloud manager password protected maven build not working | Community
Skip to main content
Level 2
February 4, 2025
Solved

Cloud manager password protected maven build not working

  • February 4, 2025
  • 2 replies
  • 879 views

Currently we are integrating the 3rd part integration for which we need to download the dependency from the password protected url. And added password in the cloud manager pipeline variable but still I am getting the 401. Can you help if there is any other configuration we need to do.

 

Thanks in advance !!!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by narendiran_ravi

This configs are already in place but still it is saying 401.

status code:
401, reason phrase: Unauthorized (401) -> [Help 1]


Hi @pratikshah ,

If you are using git submodules then the settings.xml should be added under your parent project .cloudmanger/maven/settings.xml 

 

ex:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> <servers> <server> <id>third-party</id> <username>Username</username> <password>${env.MAVEN_PASSWORD}</password> </server> </servers> </settings>

Make sure you add this variable in your pipeline https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/using-cloud-manager/cicd-pipelines/pipeline-variables#pipeline-variables 

 

in your parent pom.xml of your respective submodule add the respostories

<repositories> <repository> <id>third-party</id> //same Id as mentioned in the settings.xml <name>third-party</name> <url>https://your.respository.url/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories>

2 replies

arunpatidar
Community Advisor
Community Advisor
February 5, 2025

Hi @pratikshah 

Could you please share sample settings.xml file?

Arun Patidar
Level 2
February 5, 2025


<server>
<id>third-party</id>
<username>${env.USERNAME}</username>
<password>${env.PASSWORD}</password>
</server>

Level 2
February 6, 2025

1. Place settings.xml: Ensure settings.xml is in the .cloudmanager/maven/ directory in the root of the main repository (not in the sub-module).

2. Check Environment Variables: Verify the USERNAME and PASSWORD variables are set correctly in Cloud Manager's pipeline variables.
3. Correct settings.xml:

<servers> <server> <id>third-party</id> <username>${env.USERNAME}</username> <password>${env.PASSWORD}</password> </server> </servers>

4. Verify pom.xml Repository: Ensure the repository URL is correctly specified in pom.xml:

<repositories> <repository> <id>third-party</id> <url>https://your-secure-repo.com</url> </repository> </repositories>

5. Test Locally: Run the build locally to confirm the credentials work. Make sure the settings file is accessible and correctly configured in the pipeline. 


This configs are already in place but still it is saying 401.

status code:
401, reason phrase: Unauthorized (401) -> [Help 1]

kautuk_sahni
Community Manager
Community Manager
February 10, 2025

@pratikshah Did you find the suggestions helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!

Kautuk Sahni