How can I use Jenkins git credentials in groovy script -


i using extensible choice parameter plugin

with groovy script

return ['git','ls-remote','-h', 'git@github.com:company/project.git' ]        .execute().text.split("\\n?[a-f0-9\t]+refs/heads/")        .tolist().tail().collect{ it-> it.trim()} 

this works on older version of jenkins trying migrate , works when using public git hub repo https

i not sure need work. on jenkins 2.60.2 , plugins date


Comments

Popular posts from this blog

Ansible warning on jinja2 braces on when -

Parsing a protocol message from Go by Java -

html - How to custom Bootstrap grid height? -