Thanks Mark, yeah this is one option but in this case, username and 
password are visible in console output. I am thinking to use SSH Keys.


On Monday, 2 October 2017 13:46:24 UTC+11, Mark Waite wrote:
>
> 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 <vika...@gmail.com 
> <javascript:>> 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-use...@googlegroups.com <javascript:>.
>> 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/4c5d568f-4ff0-4acc-b509-dc8ca0adec67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to