bash - Download Artifacts from Jenkins with cURL and GitHub Authentication -
i'm attempting download build artifacts jenkins via curl
in bash script. however, use github authentication, , using api key belonging administrator user, 403
errors , cannot download.
my curl
command follows:
curl -u me:myapitoken -k 'https://jenkins.example.com/job/my-project/lastsuccessfulbuild/artifact/output/artifact_name'`
the header output indicates jenkins considers me logged in administrator, yet, 403
error , unable download artifact.
< http/1.1 403 forbidden < date: tue, 28 jun 2016 10:03:55 gmt < server: jetty(winstone-2.9) < x-content-type-options: nosniff < x-you-are-authenticated-as: <me> < x-you-are-in-group: authenticated < x-required-permission: hudson.model.hudson.read < x-permission-implied-by: hudson.security.permission.genericread < x-permission-implied-by: hudson.model.hudson.administer < cache-control: no-cache,no-store,must-revalidate < x-hudson-theme: default < content-type: text/html;charset=utf-8 < expires: thu, 01 jan 1970 00:00:00 gmt < x-hudson: 1.395 < x-jenkins: 1.656 < x-jenkins-session: fbdxxxxx < x-hudson-cli-port: 51518 < x-jenkins-cli-port: 51518 < x-jenkins-cli2-port: 51518 < x-frame-options: sameorigin < x-instance-identity: miibijanbgkqhkig9w0b<...>xwidaqab < x-ssh-endpoint: jenkins.example.com:53605 < content-length: 5166 < set-cookie: jsessionid.xxxxxxx=b2rxxxxxxxxxx5btw3e;path=/;secure;httponly
the link works fine in browser whilst logged github , jenkins.
does have idea authenticate via curl
when using github primary authentication provider?
so apparently due bug in github authentication plugin. installing latest updates has fixed issue , allowed me authenticate using api key.
Comments
Post a Comment