How to checkout ssh remote in github organization Jenkins workflow and use ssh credentials in Jenkinsfile

我只是一个虾纸丫 提交于 2019-12-05 05:51:38

It turns out that the Github Organization item only uses https credentials for the Scan credentials (like the picture above).

The solution was to hit Advanced button, and to actually select a ssh credential in the Checkout credentials dropdown instead of the default - Same as scan credentials -.

Note that credentials with stars are user/password entries, that's how I found the problem.

This way, the checkout scm will use ssh instead and the sshagent([jenkinsCredsId]) { block will work as expected, letting you create tags, fetch and push according to your rights. :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!