无法创build运行服务的用户帐户

我正在运行Server 2012 R2(服务器核心),而且在设置Gitlab CI Multi Runner时,遇到了麻烦,无法像专门为此服务创build的用户那样运行服务。

以下是相关问题: https : //gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/1265

我已经创build了这样的用户帐户:

net user gitlab-runner "P@55w0rd" /add /fullname:"GitLab CI Runner User" /homedir:"C:\Users\gitlab-runner" 

当我尝试安装跑步者时,我得到一个错误,说明该帐户无效:

 .\gitlab-ci-multi-runner-windows-amd64 install -u "gitlab-runner" -p "P@55w0rd" FATAL: Failed to install gitlab-runner: The account name is invalid or does not exist, or the password is invalid for the account name specified. 

这个错误来自Windows,当我尝试手动执行时,我得到了同样的结果:

 .\gitlab-ci-multi-runner-windows-amd64 install PS C:\Users\gitlab-runner> sc.exe config gitlab-runner obj= "gitlab-runner" password= "P@55w0rd" [SC] ChangeServiceConfig FAILED 1057: The account name is invalid or does not exist, or the password is invalid for the account name specified. 

我需要创build一个“服务帐户”吗?

  • 如何从命令行授予“作为服务login”权限(本地)?

  • 我甚至按照这个答案将SeServiceLogonRight添加到用户: https : SeServiceLogonRight (通过secedit /export /cfg c:\backup.txt