Blog icon indicating copy to clipboard operation
Blog copied to clipboard

jenkins凭证解密

Open zj1244 opened this issue 4 years ago • 0 comments

前提

需要可以执行script

获得加密后的凭据

通过访问凭据->系统->全局凭据->某个凭据->更新来查看加密后的凭据 image

解密

点击系统管理->命令脚本行,输入如下代码,即可查看密码

println(hudson.util.Secret.fromString('xxxxxxxxxxxxxxxxxxxx').getPlainText())

或者

println(hudson.util.Secret.decrypt("xxxxxxxxxxxxxxx"))

image

参考: https://fortynorthsecurity.com/blog/the-security-of-devsecops-jenkins/

zj1244 avatar Apr 07 '20 06:04 zj1244