Hi, I have a script which does an API call. To authenticate myself, I use a token.
$ curl 'https://ci.example.com/go/api/stages/mypipeline/defaultStage/history' \ -H "Authorization: Bearer ${GOCD_ACCESS_TOKEN}" \ -H 'Accept: application/vnd.go.cd.v3+json' When I use this api, if in my script I use my personal access token generated by GOCD, the call works. However, if I have the same API call with the same token, but the token is inside the secure variable section of the pipeline, and called using ${GOCD_ACCESS_TOKEN}, I am unable to get authenticated. I have tried to hash the token to see if it matches. When doing cksum on my personal token inside my script, I get a different result from if I did cksum <<<${GOCD_ACCESS_TOKEN}. I am a junior, so I have much to learn and I would apperciate any help in understanding how to resolve this issue. Thank you :) Gabes. -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/2a219c35-6c78-4ae3-8070-1e2a54118638n%40googlegroups.com.
