1

I am trying to get the Changelog to one file and save into the workspace and uploading the same file to hockeyapp from workspace as Postbuild Action using the below commands.

Changelog=$(curl "${BUILD_URL}api/xml?wrapper=changes&xpath=//changeSet//item//msg" | sed -e "s/</msg>//g; s//\`echo -e '\r'`/g; s/</*changes>//g" ) echo -e "$Changelog" > "${WORKSPACE}/"Changelog-${BUILD_NUMBER}.html

The error in console log shows as below.

Authentication required
<!--
You are authenticated as: anonymous
Groups that you are in:

Permission you need to have (but didn'\''t): hudson.model.Hudson.Read
 ... which is implied by: hudson.security.Permission.GenericRead
 ... which is implied by: hudson.model.Hudson.Administer
-->

Can anyone please suggest how we can make it work.

Lakshmi Reddy
  • 313
  • 5
  • 17
  • It seems that your Jenkins server don't allow anonymous access. So you have to login to get the changelog. Jenkins is running on Windows or Linux? (I may have one solution for Linux, waiting for your answer) – Bruno Lavit Sep 14 '15 at 11:39
  • I am already logined as Admin, My Jenkins was running on Mac OS X . Thanks – Lakshmi Reddy Sep 14 '15 at 11:42
  • Curl is trying to get the changelog with an anonymous access. You should go in the Jenkins config and allow a read access for the anonymous user (https://wiki.jenkins-ci.org/display/JENKINS/Standard+Security+Setup, section Matrix-based Security). – Bruno Lavit Sep 14 '15 at 11:50
  • Thanks for Info, Do you have any idea to pass Admin/Specific user details in curl to access Changelog instead of anonymous user . – Lakshmi Reddy Sep 14 '15 at 11:56
  • http://stackoverflow.com/questions/10698419/how-can-a-jenkins-user-authentication-details-be-passed-to-a-script-which-uses – Bruno Lavit Sep 14 '15 at 12:35

0 Answers0