Friday, February 14, 2020

Decode Jenkins Password


Reference:https://devops.stackexchange.com/questions/2191/how-to-decrypt-jenkins-passwords-from-credentials-xml
  1. In Jenkins, go to: /script page.
  2. Run the following command:
    println(hudson.util.Secret.decrypt("{XXX=}"))
    
    or:
    println(hudson.util.Secret.fromString("{XXX=}").getPlainText())
    
    where {XXX=} is your encrypted password. This will print the plain password.
    To do opposite, run:
    println(hudson.util.Secret.fromString("some_text").getEncryptedValue())

Tuesday, February 4, 2020

SSL certificate problem: unable to get local issuer certificate

Jenkins tries to check out from bitbucket/git, but get below error:
SSL certificate problem: unable to get local issuer certificate

Cause:
Bitbucket/Git is using selfsigned certificate.

Solution:

On jenkins server, log in as jenkins, and run below command:

$ git config --global http.sslVerify false
$ cat ~/.gitconfig
[http]
        sslVerify = false

Restart jenkins
# systectl restart jenkins

Set up Outgoing proxy for Bitbucket

Set up Outgoing proxy for Bitbucket

Add JVM_SUPPORT_RECOMMENDED_ARGS to _start-webapp.sh
vi _start-webapp.sh

JVM_SUPPORT_RECOMMENDED_ARGS=" -Dhttp.proxyHost=proxy.goweekend.ca -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.goweekend.ca -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=*.toronto.ca\|localhost"