How to debug a Github Actions’ secret

One irritating thing about Github Actions is you can’t debug secrets. If you try to debug secrets you’ll get *** in the log.

This makes sense because Github is trying to help us keep the secret secret (ha!). But it doesn’t help when we’re trying t…


This content originally appeared on Zell Liew and was authored by Zell Liew

One irritating thing about Github Actions is you can’t debug secrets. If you try to debug secrets you’ll get *** in the log.

run echo

This makes sense because Github is trying to help us keep the secret secret (ha!). But it doesn’t help when we’re trying to figure out whether there’s something wrong with the secret we provided.

There’s still a way to show this secret if you really want to show it. You can separate the characters with a space using the following code. The secret will now show up.

run: echo ${{secrets.YOUR_SECRET }} | sed 's/./& /g'
separate characters with a space

That said, make sure you’re testing a fake secret if you use this method, since this secret will get logged into the Github Actions panel for everyone to see.


This content originally appeared on Zell Liew and was authored by Zell Liew


Print Share Comment Cite Upload Translate Updates
APA

Zell Liew | Sciencx (2021-03-24T00:00:00+00:00) How to debug a Github Actions’ secret. Retrieved from https://www.scien.cx/2021/03/24/how-to-debug-a-github-actions-secret/

MLA
" » How to debug a Github Actions’ secret." Zell Liew | Sciencx - Wednesday March 24, 2021, https://www.scien.cx/2021/03/24/how-to-debug-a-github-actions-secret/
HARVARD
Zell Liew | Sciencx Wednesday March 24, 2021 » How to debug a Github Actions’ secret., viewed ,<https://www.scien.cx/2021/03/24/how-to-debug-a-github-actions-secret/>
VANCOUVER
Zell Liew | Sciencx - » How to debug a Github Actions’ secret. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/03/24/how-to-debug-a-github-actions-secret/
CHICAGO
" » How to debug a Github Actions’ secret." Zell Liew | Sciencx - Accessed . https://www.scien.cx/2021/03/24/how-to-debug-a-github-actions-secret/
IEEE
" » How to debug a Github Actions’ secret." Zell Liew | Sciencx [Online]. Available: https://www.scien.cx/2021/03/24/how-to-debug-a-github-actions-secret/. [Accessed: ]
rf:citation
» How to debug a Github Actions’ secret | Zell Liew | Sciencx | https://www.scien.cx/2021/03/24/how-to-debug-a-github-actions-secret/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.