Git push using jenkins credentials from declarative pipeline

后端 未结 2 1894
南方客
南方客 2020-12-20 17:26

I\'m using jenkins pipeline (declarative synthax) and I want to push a commit to my remote repository.

Is there any way to accomplish this using the git plugin? Here

2条回答
  •  忘掉有多难
    2020-12-20 18:15

    You can't use username:password for connecting to git repo in script.

    You should use ssh key. Please see this answer for more information

提交回复
热议问题