这里介绍windows电脑安装Jenkins时,想要安装为Jenkins服务的安装方式.
1. 以服务安装时报错
常见的有乱码报错和账号报错。
乱码报错:
账号报错:
this account either dose not have the privilege to logon as a service or the account was unabled to be verified
2. 报错原因与解决方式
乱码报错
乱码报错是因为使用微软账户登录,需要切换到本地账户登录
设置 ---- 账户 ---- 账户信息 ---- 改用本地账户登录
切换回本地账户登录之后,大概率还会出现账号报错
账号报错
这里报错都是因为使用的账号没有 Login As Service 登录权限造成的,解决办法就是给账号添加 Login As Service 权限。
添加 Login As Service 权限需要使用本地策略管理。
具体步骤为:
控制面板 ---- 大图标 ---- 管理工具 ---- 本地安全策略
打开本地安全策略之后,在左侧依次点击: