使用CLI自动设置jenkins用户 [英] Automatically setup jenkins users with CLI

查看:85
本文介绍了使用CLI自动设置jenkins用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有找到有关jenkins-cli工具的用户相关命令的参考.

I did not find any reference to user related commands for the jenkins-cli tool.

我需要它来自动化部署.

I need this to automate deployment.

有没有卷土重来?

推荐答案

也许您根本不想使用Jenkins的内部用户数据库.有许多身份验证和用户管理"插件.

Maybe you don't want to use Jenkins' internal user database at all. There are a host of "Authentication and User Management" plugins.

如果您喜欢MySQL,则有一个MySQL身份验证器(它读取用户名和密码表),并且您的"adduser"命令可以在该表上进行插入.

If you like MySQL, there is a MySQL authenticator (it reads a table of users and passwords), and your "adduser" command could do an insert on that table.

如果您喜欢平面文件,则可以使用脚本安全领域",在其中可以使用任意脚本进行身份验证.用您喜欢的格式编写一个包含用户和密码组合的文件,编写一个写入该文件的"adduser"脚本,并编写一个读取该文件并确定是否对用户进行身份验证的auth脚本.

If you like flat files, there is a "Script Security Realm", where you can authenticate with an arbitrary script. Write a file with user and password combos in your favorite format, write an "adduser" script that writes to it, and write an auth script that reads the file and determines whether to authenticate the user.

您还可以连接到LDAP服务器,Active Directory,Atlassian Crowd,Unix用户帐户(pw_auth)或您的应用程序服务器使用的任何身份验证(例如,如果它在Tomcat服务器上运行,则可以告诉Jenkins允许Tomcat对用户进行身份验证,并设置Tomcat随心所欲.

You can also hook up to an LDAP server, Active Directory, Atlassian Crowd, Unix user accounts (pw_auth), or whatever authentication your application server uses (if it's running off of a Tomcat server, for instance, you can tell Jenkins to let Tomcat authenticate users, and set up Tomcat to do it however you want.

这篇关于使用CLI自动设置jenkins用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆