If your GIT_URL is https, then you could embed the username and password into the URL. For example, the URL:
https://github.com/user/repo can be https://username:passw...@github.com/user/repo Mark Waite On Sun, Oct 1, 2017 at 8:36 PM Vikas Kumar <vikas...@gmail.com> wrote: > We are trying to use AWS DynamoDB (with KMS encrypted values) to store our > secrets rather than using Jenkins Credentials. This is advised by our > security team. > > I am able to fetch secrets (git username and password) as variables on > Jenkins slaves, but not sure how to use those to *checkout* git > repository using those. > > > This is our existing code > > > stage('SCM Checkout') { > checkout([$class: 'GitSCM', branches: [[name: "*/${GIT_BRANCH}"]], > doGenerateSubmoduleConfigurations: false, extensions: [], > submoduleCfg: [], > userRemoteConfigs: [[credentialsId: 'GIT_PASSWORD', url: > "${GIT_URL}"]]])} > > > I want to use variable GIT_USER and GIT_PASSWORD (fetched from AWS) > instead of using *credentialsId* > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/7a811855-da28-4a82-9b33-ac824b5e89a3%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/7a811855-da28-4a82-9b33-ac824b5e89a3%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtFdptkFauCGXshyMjGh5Zy4v9s5VXgyYWD5EUMa-CZ%2BGQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.