问题描述
我想使用scp/ssh将一些文件上传到服务器.我发现我需要使用基于证书的身份验证,但是问题是如何?我真正想做的是使用与git一起使用的相同种类的凭据-存储在Jenkins中的带密码的ssh证书.但是,我不知道该怎么做-代码段生成器对此没有明显的选择.
I want to use scp/ssh to upload some files to a server. I discover that I need to use certificate-based authentication, but the question is how? Really what I want to do is to use the same sort of credentials I use with git - passworded ssh cert stored in Jenkins. However, I can't work out how to - the snippet generator has no obvious option for that.
其他人做什么?有没有记录的功能可以做到这一点?
What do others do? Is there an undocumented feature that would do this?
推荐答案
如果安装 SSH代理插件,您可以使用 ssh-agent
管道步骤,以在ssh-agent处于活动状态的情况下运行shell脚本. ssh-agent
带有Jenkins凭证ID(一种密码ssh证书,类似于git的证书).
这篇关于在skin,scp或sftp的jenkins管道中使用ssh凭据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!