gpt4 book ai didi

java - Maven 构建错误 - 未经授权

转载 作者:行者123 更新时间:2023-12-02 12:11:19 24 4
gpt4 key购买 nike

我是 Maven 新手。关于下面的 Maven 构建错误的任何建议都会对我有帮助。我正在使用命令“mvn clean install”来构建应用程序

[DEBUG] Could not find metadata mycompany-myvault:mycompany-myvault-models-common:0.0.1-SNAPSHOT/maven-metadata.xml in local (C:\Users\build_account\.m2\repository)
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://mycompany-marketing.pkgs.visualstudio.com/_packaging/mycompany.myvault.Packages/maven/v1
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://mycompany-marketing.pkgs.visualstudio.com/_packaging/mycompany.myvault.Packages/maven/v1 via proxy-azsu.azure.uk.mycompanyplc.com:8080
Downloading: https://mycompany-marketing.pkgs.visualstudio.com/_packaging/mycompany.myvault.Packages/maven/v1/mycompany-myvault/mycompany-myvault-models-common/0.0.1-SNAPSHOT/maven-metadata.xml
[DEBUG] Writing tracking file C:\Users\build_account\.m2\repository\mycompany-myvault\mycompany-myvault-models-common\0.0.1-SNAPSHOT\resolver-status.properties
[WARNING] Could not transfer metadata mycompany-myvault:mycompany-myvault-models-common:0.0.1-SNAPSHOT/maven-metadata.xml from/to mycompany-marketing-visualstudio.com-mycompany.myvault.packages (https://mycompany-marketing.pkgs.visualstudio.com/_packaging/mycompany.myvault.Packages/maven/v1): Not authorized , ReasonPhrase:Unauthorized.
org.eclipse.aether.transfer.MetadataTransferException: Could not transfer metadata mycompany-myvault:mycompany-myvault-models-common:0.0.1-SNAPSHOT/maven-metadata.xml from/to mycompany-marketing-visualstudio.com-mycompany.myvault.packages (https://mycompany-marketing.pkgs.visualstudio.com/_packaging/mycompany.myvault.Packages/maven/v1): Not authorized , ReasonPhrase:Unauthorized.

最佳答案

在 Settings.xml 中添加以下凭据修复了此问题。在 vsts 中,您可以通过 Packages -> Connect to Feed ->Generate mavencredentials 生成 Maven 凭证。它将生成如下凭据并将其放在 settings.xml 中

<server>
<id>mycompany-marketing-visualstudio.com-mycompany.myvault.packages</id>
<configuration>
<httpHeaders>
<property>
<name>Authorization</name>
<value>Basic 5asdfasdfasdfaTASDFasdfadfasdfasddfadsasdfasdf as34asfase4asdfasfsadfdfgfdgrfgrtetryuikmnbvfft6iuopuytrewwsdfghjj</value>
</property>
</httpHeaders>
</configuration>
</server>

关于java - Maven 构建错误 - 未经授权,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46525946/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com