Hello people,

We need to "schedule" a pipeline on a GoCd server, from another GoCd server.
We have been able to do so using this documentation providing the username 
and password in plain text as the arguments for -u (highlighted below):

https://api.gocd.org/current/#scheduling-pipelines

curl 'https://ci.example.com/go/api/pipelines/pipeline1/schedule' \
       -u '#username#:#password#' \
       -H 'Accept: application/vnd.go.cd.v1+json' \
       -H 'Content-Type: application/json' \
       -X POST \
       -d '{}'


But we aren't able to provide an encrypted password and get it to work.
The documentation suggests that you are able to provide an encrypted 
password in the body of the request using -d option.

-d '{
             "environment_variables": [
               {
                 "name": "USERNAME",
                 "secure": false,
                 "value": "bob"
               },
               {
                 "name": "SSH_PASSPHRASE",
                 "value": "some passphrase",
                 "secure": true,
               },
               {
                 "name": "PASSWORD",
                 "encrypted_value": "YEepp1G0C05SpP0fcp4Jh+kPmWwXH5Nq",
                 "secure": true,
               }
             ]      }'

We have tried lots of different ways and non worked.

To create the encrypted password we use the encryption api endpoint.
https://api.gocd.org/current/#encrypt-a-plain-text-value

What is the best way to do this and keep the password in an encrypted 
format rather than plain text when authenticating from a different GoCd 
server? 

Thanks for your help in advance.

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to