Using the git command with credentials form a pipeline

34 перегляди
Перейти до першого непрочитаного повідомлення

Nathan Hüsken

не прочитано,
16 вер. 2016 р., 16:34:1716.09.16
Кому: Jenkins Users
Hi,

I am trying to use git from a pipeline. For this I want to invoke git commands using "sh":

    sh('git clone https://myserver/project.git')

Some things I want to do require authentication.

When I use the GitSCM plugin (checkout([$class: 'GitSCM', ...), it tells me it uses GIT_ASKPASS for credentials.

Can I do that too? How would I have to configure GIT_ASKPASS for this to work?

Thanks!
Nathan

Mark Bidewell

не прочитано,
17 вер. 2016 р., 19:49:2117.09.16
Кому: Jenkins Users
I don't know if this helps or not but to use cmd line git in pipeline, I use the SSH Agent plugin along with SSH key authentication.
Відповісти всім
Відповісти автору
Переслати
0 нових повідомлень