-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
- Jenkins v2.190.1 / Windows
- Artifactory Plugin v3.4.x
- Artifactory 6.12.2
After Updating to the artifactory plugin v3.4.1 all up- or downloads using the declarative steps fail by 401 (upload) / 403 (download) HTTP errors.
Both are working with v3.3.x and broken with 3.4.x.
According the Artifactory logs the steps do not authenticate.
Upload
rtUpload(serverId: 'artifactory-test', specPath: 'spec-ul.json') rtPublishBuildInfo(serverId: 'artifactory-test')
Fails with error 401:
Unauthorized Status code: 401 at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecDeploymentConsumer.consumerRun(SpecDeploymentConsumer.java:44) [...]
Download
rtDownload(serverId: 'artifactory-test', specPath: 'spec-dl.json')
Fails with error 403:
java.io.IOException: Failed to search artifact by the aql 'items.find({"repo": "msys2","path": {"$ne": "."}, "$or": [{"$and": [{"path": { "$match": "distrib"},"name": { "$match": "msys2-x86_64-latest.tar.xz"}}]}]}).include("name","repo","path","actual_md5","actual_sha1","size","type","property")': HTTP/1.1 403 at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryDependenciesClient.getResponseStream(ArtifactoryDependenciesClient.java:136) [...]
Configuration
Artifactory is configured in the Jenkins settings (id artifactory-test in the examples) and useses the Credentials Plugin to access credentials.
The Test Connection button returns the correct Artifactory version.
Tested version of the plugin
Version | Result |
---|---|
3.3.0 | ![]() |
3.3.1 | ![]() |
3.3.2 | ![]() |
3.4.0 | ![]() |
3.4.1 | ![]() |
Workaround
Downgrade to a v3.3.x release.
- relates to
-
JENKINS-58902 Non-user-scoped credentials are not shown when build authentication is configured
-
- Open
-
-
JENKINS-55624 Authorize Projects plugin causes no git credentials to be found with 'Run as Specific User' Strategy is set
-
- Fixed but Unreleased
-
- links to
[JENKINS-59973] rtUpload / rtDownload fail with HTTP 401 / 403
Attachment | New: stacktrace-download.log [ 49342 ] |
Attachment | New: stacktrace-upload.log [ 49343 ] |
Description |
Original:
After Updating to the _artifactory plugin v3.4.1_ all up- or downloads using the declarative steps fail by 401 (upload) / 403 (download) HTTP errors. Both are working with v3.3.x and broken with 3.4.x. According the Artifactory logs the steps do not authenticate. h3. Upload {code:java} rtUpload(serverId: 'artifactory-test', specPath: 'spec-ul.json') rtPublishBuildInfo(serverId: 'artifactory-test') {code} Fails with error 401: {noformat} Unauthorized Status code: 401 at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecDeploymentConsumer.consumerRun(SpecDeploymentConsumer.java:44) [...] {noformat} h3. Download {code:java} rtDownload(serverId: 'artifactory-test', specPath: 'spec-dl.json') {code} Fails with error 403: {noformat} java.io.IOException: Failed to search artifact by the aql 'items.find({"repo": "msys2","path": {"$ne": "."}, "$or": [{"$and": [{"path": { "$match": "distrib"},"name": { "$match": "msys2-x86_64-latest.tar.xz"}}]}]}).include("name","repo","path","actual_md5","actual_sha1","size","type","property")': HTTP/1.1 403 at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryDependenciesClient.getResponseStream(ArtifactoryDependenciesClient.java:136) [...] {noformat} h3. Configuration Artifactory is configured in the Jenkins settings (id {{artifactory-test}} in the examples) and useses the _Credentials Plugin_ to access credentials. The _Test Connection_ button returns the correct Artifactory version. h3. Tested version of the plugin ||Version||Result|| |3.3.0|(/)| |3.3.1|(/)| |3.3.2|(/)| |3.4.0|(x)| |3.4.1|(x)| |
New:
After Updating to the _artifactory plugin v3.4.1_ all up- or downloads using the declarative steps fail by 401 (upload) / 403 (download) HTTP errors. Both are working with v3.3.x and broken with 3.4.x. According the Artifactory logs the steps do not authenticate. h3. Upload {code:java} rtUpload(serverId: 'artifactory-test', specPath: 'spec-ul.json') rtPublishBuildInfo(serverId: 'artifactory-test') {code} Fails with error 401: {noformat} Unauthorized Status code: 401 at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecDeploymentConsumer.consumerRun(SpecDeploymentConsumer.java:44) [...] {noformat} h3. Download {code:java} rtDownload(serverId: 'artifactory-test', specPath: 'spec-dl.json') {code} Fails with error 403: {noformat} java.io.IOException: Failed to search artifact by the aql 'items.find({"repo": "msys2","path": {"$ne": "."}, "$or": [{"$and": [{"path": { "$match": "distrib"},"name": { "$match": "msys2-x86_64-latest.tar.xz"}}]}]}).include("name","repo","path","actual_md5","actual_sha1","size","type","property")': HTTP/1.1 403 at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryDependenciesClient.getResponseStream(ArtifactoryDependenciesClient.java:136) [...] {noformat} h3. Configuration Artifactory is configured in the Jenkins settings (id {{artifactory-test}} in the examples) and useses the _Credentials Plugin_ to access credentials. The _Test Connection_ button returns the correct Artifactory version. h3. Tested version of the plugin ||Version||Result|| |3.3.0|(/)| |3.3.1|(/)| |3.3.2|(/)| |3.4.0|(x)| |3.4.1|(x)| h3. Workaround Downgrade to a v3.3.x release. |
Issue Type | Original: New Feature [ 2 ] | New: Bug [ 1 ] |
We ran in the same problem with v3.4.1 for Maven projects in Jenkins 2.190.2 (LTS):
Downgrading to v3.3.x worked around the issue for us too.
I kind of feel this is related to picking up the right credentials.
Our jobs do not 'Override default deployer credentials' and rely on the ~/.m2/settings.xml file being populated with those.
But so far, I've not managed to work around this issue by changing the credential settings of the job.
Looking at the recent commits, I wonder if this one could be the culprit:
[HAP-1219] folder scoped credentials for deploy step (#171)