简体   繁体   English

部署文件时来自Artifactory的间歇性401错误

[英]Intermittent 401 error from Artifactory when deploying files

During our intraday builds, we intermittently (perhaps twice a day) get a '401 Unauthorized' error when maven performs the 'deploy' step of the build. 在盘中构建期间,当maven执行构建的“部署”步骤时,我们间歇性地(也许一天两次)收到“ 401未经授权”错误。 This error is seen on both the maven console and in the Artifactory requests.log. 在Maven控制台和Artifactory request.log中都可以看到此错误。 The time of day isn't consistent, nor is it tied to a snapshot/release repository. 一天中的时间不一致,也不与快照/发布存储库绑定。 I've checked and doublechecked all security settings and urls, and since this error is intermittent, I'm confident the issue lies with Artifactory. 我已经检查并仔细检查了所有安全设置和URL,并且由于此错误是间歇性的,因此我确信问题出在Artifactory。

I also get this intermittently with a 'mvn deploy:deploy-file'. 我还通过“ mvn deploy:deploy-file”间歇性地获得了该文件。 Today it failed on 1 upload out of approx 300. 今天,它在大约300个上传文件中有1个失败。

I've raised a jira with Artifactory but it's not been picked up yet: https://www.jfrog.com/jira/browse/RTFACT-14982 我已经在Artifactory上提出了一个吉拉,但是还没有被提起: https : //www.jfrog.com/jira/browse/RTFACT-14982

I should add that we didn't encounter this issue when using Archiva as our repository. 我应该补充一点,当使用Archiva作为存储库时,我们没有遇到这个问题。 It's happened regularly since I migrated to Artifactory 自从我迁移到Artifactory以来,这是定期发生的事情

With regards to the pom.xml example, the reason it is failing is that the deploy-file goal is missing the repositoryId property. 对于pom.xml示例,失败的原因是部署文件目标缺少repositoryId属性。
This property should include the repository id for the repository you use for deployment, for example: 此属性应包括用于部署的存储库的存储库ID,例如:

<repositoryId>internal-snapshot-local</repositoryId>

The plugin will use this id for getting the deployer credentials from the Maven settings.xml file. 插件将使用此ID从Maven settings.xml文件获取部署者凭据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Artifactory插件和Credentials插件将Jenven的Maven工件部署到Artifactory时解决401失败? - How can I resolve a 401 failure when deploying a Maven artifact from Jenkins to Artifactory using the Artifactory Plugin and the Credentials Plugin? Jenkins:从artifactory部署war文件 - Jenkins: deploying war files from artifactory 当发布到 gitlab artifactory 时,401 未授权来自 maven - 401 unauthorized from maven when publishing to gitlab artifactory 使用 maven 部署到工件时出错 - Error on deploying to artifactory using maven 将工件指向工件时出错 - Error when pointing artifactory to artifactory Artifactory Maven 示例失败并显示 401 错误代码 - Artifactory Maven example fails with 401 error code 从maven在nexus中部署工件会出现错误“返回代码是:401”? - Deploying artifacts in nexus from maven gives error “Return code is: 401”? 使用Maven部署到Artifactory时排除文件 - Excluding files while deploying to Artifactory using Maven 从maven在nexus中部署工件会产生错误返回代码是:401 ReasonPhrase:未经授权 - Deploying artifacts in nexus from maven gives error Return code is: 401 ReasonPhrase: Unauthorized 部署时,JFrog Artifactory不请求用户/密码 - JFrog Artifactory doesn't request user/password when deploying
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM