Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.
- What's New
- Function Overview
- Service Overview
-
Getting Started
- Uploading Software Packages to Release Repos
- Uploading Components to Maven Repository
- Releasing/Obtaining a Maven Component via a Build Task
- Releasing/Obtaining an npm Component via a Build Task
- Releasing/Obtaining a Go Component via a Build Task
- Releasing/Obtaining a PyPI Component via a Build Task
- Uploading/Obtaining an RPM Component Using Linux Commands
- Uploading/Obtaining a Debian Component Using Linux Commands
-
User Guide
- CodeArts Artifact User Guide
- Release Repos 2.0
- Self-Hosted Repos 2.0
- Release Repos 1.0
- Self-Hosted Repos 1.0
- Whitelist for All Accounts
-
Best Practices
- CodeArts Artifact Best Practices
- Releasing Maven Components and Archiving to a Self-Hosted Repo
- Releasing/Obtaining an npm Component via a Build Task
- Releasing/Obtaining a Go Component via a Build Task
- Releasing/Obtaining a PyPI Component via a Build Task
- Uploading/Obtaining an RPM Component Using Linux Commands
- Uploading/Obtaining a Debian Component Using Linux Commands
- Batch Migrating Maven/npm/PyPI Components to a Self-Hosted Repo
- API Reference
-
FAQs
- Release Repo
-
Self-Hosted Repo
- How Do I Upload Snapshots to a Maven Repository?
- How Do I Pull Components from a Maven Repository?
- Can I Call Software Packages in Self-Hosted Repos During Local Builds?
- What Should I Do With Error Code 500 When Uploading Maven Package for a Gradle Build?
- Why Did the Dependency WAR or JAR Files Fail to Be Downloaded?
- Why Is Error 401 Returned When Uploading Maven Components to Self-Hosted Repos?
- General Reference
Show all
Copied.
Why Is Error 401 Returned When Uploading Maven Components to Self-Hosted Repos?
Symptom
Failed to upload Maven components to self-hosted repos from the local IDE, and 401-Insufficient Permission is displayed.
Cause Analysis
The self-hosted repo information configured in the pom.xml file does not match the settings.xml file.
Solution
When uploading components, replace the repository_id value in the distributionManagement element of the pom.xml file with the repository_id value in the server element of the settings.xml file.
The uploading process is as follows:
- Go to the self-hosted repo page, and choose Maven from the repository list.
- Click Tutorial in the upper right corner.
- Configure the local Maven tool by following the configuration guide.
- Run mvn deploy to upload the Maven project.
- In the Maven CLI, access the directory where the pom.xml file of the Maven project is stored, check whether the repository_id value in the distributionManagement element of the pom.xml file matches the repository_id value in the server element of the settings.xml file.
- Upload the local JAR package:
mvn deploy:deploy-file -DgroupId=com.huawei -DartifactId=aopalliance -Dversion=1.0 -Dpackagi=jar
- In the Maven CLI, access the directory where the pom.xml file of the Maven project is stored, check whether the repository_id value in the distributionManagement element of the pom.xml file matches the repository_id value in the server element of the settings.xml file.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot