如何运行jenkins作为不同的用户 [英] How to run jenkins as a different user

查看:463
本文介绍了如何运行jenkins作为不同的用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试按照教程和这一个:部署为Jenkins用户或允许Jenkins作为不同的用户运行?



但我还是不能为计算爱神,作为不同的用户运行。这是我做的步骤:


  1. 下载jenkins(LTS)的macosx pkg

  2. 设置插件等和git

  3. 尝试构建它

t克隆错误,因为jenkins始终以匿名方式开始:

 由用户匿名
/ pre>

如何设置它,使jenkins像我一样运行?我使用jenkins web UI,所以它是在localhost:8080



我试图登录也使用/ login但我甚至不能使用我的名字或根用root 。



人物标签甚至没有创建用户链接,所以我被卡住了。帮助?

解决方案

问题1:



由用户匿名



表示Jenkins匿名用户。



这意味着启动构建的人没有登录。如果启用Jenkins安全,您可以为人们创建用户名,当他们登录时, / p>

 由匿名开始

将更改为

 由< username> 

注意:您不必启用安全性以运行jenkins或正确克隆



如果您要启用安全性和创建用户,请转到管理Jenkins>配置系统。你应该看到那里的选项。



=================================== ===============================================

问题2:



无法克隆错误是一个不同的问题。它与您登录jenkins或启用安全无关。它只是意味着Jenkins没有凭据从您的git SCM克隆。



查看 https://wiki.jenkins -ci.org/display/JENKINS/Git+Plugin 来查看如何设置Jenkins以使用您的git存储库。



希望有帮助。


I have been trying to follow tutorials and this one: Deploy as Jenkins User or Allow Jenkins To Run As Different User?

but I still can't for the love of the computing gods, run as a different user. Here are the steps of what I did:

  1. download the macosx pkg for jenkins(LTS)
  2. setup plugins etc and git
  3. try to build it

I keep getting a can't clone error because jenkins keeps starting as anonymous:

Started by user anonymous

How do I set it up so that jenkins runs as me? I was using the jenkins web UI so it was in localhost:8080

I tried logging in also using /login but I can't even login using my name or as root.

The people tab doesn't even have a create user link, so yeah I've been stuck. Help please?

解决方案

ISSUE 1:

Started by user anonymous

That does not mean that Jenkins started as an anonymous user.

It just means that the person who started the build was not logged in. If you enable Jenkins security, you can create usernames for people and when they log in, the

"Started by anonymous" 

will change to

"Started by < username >". 

Note: You do not have to enable security in order to run jenkins or to clone correctly

If you want to enable security and create users, go to Manage Jenkins > Configure System. You should see the options there.

===========================================================================

ISSUE 2:

The "can't clone" error is a different issue altogether. It has nothing to do with you logging in to jenkins or enabling security. It just means that Jenkins does not have the credentials to clone from your git SCM.

Check out https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin to see how to set up Jenkins to work with your git repository.

Hope that helps.

这篇关于如何运行jenkins作为不同的用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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