Go-cd pipeline restore

32 views
Skip to first unread message

Uma Tiwari

unread,
Feb 23, 2021, 8:53:23 AM2/23/21
to go-cd
Hi,
I have deleted some of the secrete environment variables by mistake yesterday.
How can I restore them back.

thanks,
Uma

Sriram Narayanan

unread,
Feb 23, 2021, 8:57:26 AM2/23/21
to go...@googlegroups.com
 

thanks,
Uma

--
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 go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/5ee09aa0-cbe9-4f66-8cec-e89ae0768f2en%40googlegroups.com.

Uma Tiwari

unread,
Feb 23, 2021, 9:01:06 AM2/23/21
to go-cd
Hi,

As I said it was the secure variable, so in xml I cannot see the correct vaule but AES encrypted value.

How can I restore its actual value?

Sriram Narayanan

unread,
Feb 23, 2021, 9:09:47 AM2/23/21
to go...@googlegroups.com
On Tue, Feb 23, 2021 at 10:01 PM Uma Tiwari <umati...@gmail.com> wrote:
Hi,

As I said it was the secure variable, so in xml I cannot see the correct vaule but AES encrypted value.

How can I restore its actual value?

The actual value is encrypted and stored in the config XML. 

The config.xml git repo is within the gocd db directory. You could explore the history to see the earlier versions of the file. The Web view from the link I gave earlier shows the config diffs. Since you had said that you had deleted the variable by mistake, looking into the history will help you get the variable with the encrypted value back. Once you restore it, you should be able to use it. 

Here's something from a temporary GoCD instance I set up to explore this for you.

vagrant@ubuntu-bionic:~/go-server-21.1.0/db/config.git$ git log
commit bd609d9444d6dd5533a73c6e30d787c45950c75a (HEAD -> master)
Author: Upgrade <sup...@thoughtworks.com>
Date:   Mon Feb 22 16:14:41 2021 +0000

    user:Upgrade|timestamp:1614010481388|schema_version:139|go_edition:OpenSource|go_version:21.1.0 (12439-5a4959c7c4ede49165ec961b0219126cd5aa9e52)|md5:7fadaea9b89acb2f4d695812e04c2346
vagrant@ubuntu-bionic:~/go-server-21.1.0/db/config.git$ pwd
/home/vagrant/go-server-21.1.0/db/config.git



 

On Tuesday, February 23, 2021 at 1:57:26 PM UTC srir...@gmail.com wrote:
On Tue, Feb 23, 2021 at 9:53 PM Uma Tiwari <umati...@gmail.com> wrote:
Hi,
I have deleted some of the secrete environment variables by mistake yesterday.
How can I restore them back.

 

thanks,
Uma

--
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 go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/5ee09aa0-cbe9-4f66-8cec-e89ae0768f2en%40googlegroups.com.

--
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 go-cd+un...@googlegroups.com.

Uma Tiwari

unread,
Feb 23, 2021, 9:45:22 AM2/23/21
to go-cd
Hi,
thanks for responsing.
My question here is, even in config.xml file in git the values have stored in AES encrypted. adding what from UI wont make any sense.
for example,

<environmentvariables>
<variable name="_USER" secure="true">
<encryptedValue>AES:hdgwjhdjhcklsjfkhclvjndfnvknklnvkfvhbvljf=</encryptedValue>
</variable>
<variable name="_PWD" secure="true">
<encryptedValue>AES:jfhjskdvbhwgxhekjbjkdvbjgcvjbvfjbfjbvfbvn=</encryptedValue>
</variable>

Fenn

unread,
Feb 23, 2021, 12:58:44 PM2/23/21
to go...@googlegroups.com
You can directly edit the XML from the UI:
Admin > Config XML

Are you sure you are not just trying to crack someone else's password
that you aren't really authorized to access?

It seems that you really want the clear-text password even though you
claim to want to restore.
Reply all
Reply to author
Forward
0 new messages