Skip to content

[JENKINS-73422] JENKINS-72636 breaks scripted downloads #16479

@jenkins-infra-bot

Description

@jenkins-infra-bot

The change made for JENKINS-72636 breaks scripted downloads with wget
If you follow the documentation https://www.jenkins.io/doc/book/system-administration/authenticating-scripted-clients/#shell-with-wget and use the command

wget --auth-no-challenge \
    --user=user --password=apiToken \
    http://jenkins.example.com/job/yourjob/lastSuccessfulBuild/artifact/build_record.txt

wget will pass the username and password both for the initial request to the jenkins URL.
Upon receiving the redirect to the resource URL, wget will again supply the BASIC authentication.

The change made causes the download to fail with a 400 error and a cryptic error message in the logs `hudson.security.AccessDeniedException3: anonymous is missing the Run/Artifacts permission`

Currently a work around is to use a `.netrc` so that the credentials are only sent for the main jenkins domain and not the resource subdomain


Originally reported by sm__liam_baker, imported from: JENKINS-72636 breaks scripted downloads
  • assignee: allan_burdajewicz
  • status: Resolved
  • priority: Minor
  • component(s): core
  • label(s): 2.462.3-fixed
  • resolution: Fixed
  • resolved: 2024-09-02T00:04:35+00:00
  • votes: 0
  • watchers: 3
  • imported: 2025-11-24
Raw content of original issue

The change made for JENKINS-72636 breaks scripted downloads with wget If you follow the documentation https://www.jenkins.io/doc/book/system-administration/authenticating-scripted-clients/#shell-with-wget and use the command

wget --auth-no-challenge \
    --user=user --password=apiToken \
    http://jenkins.example.com/job/yourjob/lastSuccessfulBuild/artifact/build_record.txt

wget will pass the username and password both for the initial request to the jenkins URL. Upon receiving the redirect to the resource URL, wget will again supply the BASIC authentication.

The change made causes the download to fail with a 400 error and a cryptic error message in the logs `hudson.security.AccessDeniedException3: anonymous is missing the Run/Artifacts permission`

Currently a work around is to use a `.netrc` so that the credentials are only sent for the main jenkins domain and not the resource subdomain

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions