jenkins凭据管理(配置github密钥)
1.凭据管理
添加两种类型的凭据,Username with password和Secret text(填的token)
Username with password是github登录的用户名和密码,Secret text填的github生成的token,权限的限制更细,安全性更高一些
Dashboard -> Manage Jenkins -> 凭据 -> 全局 -> Add Credentials
1) Username with password
2) Secret text
步骤一:github生成token
登录github生成token,Settings -> Developer Settings -> Personal access tokens -> Tokens(classic)-->Generate new token
生成token后,复制下面的token
步骤二:创建凭据 Secret text
创建凭据--Secret text ,Secret填上面github生成的token
2.系统配置
进入jenkins系统管理--系统配置 ,找到Github选项,添加github服务器