部署为Jenkins用户或允许Jenkins作为不同的用户运行? [英] Deploy as Jenkins User or Allow Jenkins To Run As Different User?

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

问题描述

我刚刚开始使用Jenkins CI,有一个问题,我是
努力寻找在文档或在线的答案。难道如果
有人可能能够提供一些建议吗?



我试图使用它来自动部署我的开发和阶段
分支我的Django项目,它们托管在Github
组织仓库(即私有)上。目前我有一个用户
django谁可以通过Github部署密钥访问Github repo。我的
Jenkins用户无法访问repo。
处理这个的最佳实践方法是什么 - 我应该为
jenkins用户创建一个ssh部署密钥,还是应该让Jenkins作为我的django运行
用户?我已经看到提到如果一个新闻组帖子中的HUDSON_USER,但是我
在文档中找不到这个参考。



非常感谢! p>

Ludo。

解决方案

我没有使用Github,可能不适用,但我们使用Jenkins,我们使用CVS& Subversion for source control。



在我们的系统中,我们对这三个用户使用不同的用户名/密码组合(Jenkins,CVS,Subversion) (自从我们部署了Hudson - 目前已经建立了50多个项目已经有一年了)。



只要您可以使用github deploy键访问jenkins,就不需要更改Jenkins作为django运行,或创建jenkins用户github的键。就个人而言,我会保持他们分开。


I'm just getting started with Jenkins CI, and had a question which I'm struggling to find answers for in the docs or online. Wonder if someone might be able to offer some advice?

I'm attempting to use it to automatically deploy my dev and stage branches of my Django projects which are hosted on a Github organisation repository (ie, private). At the moment I have a user "django" who can access the Github repo via a Github deploy key. My Jenkins user can't access the repo. What's the best practice way of dealing with this - should I be creating an ssh deploy key for the "jenkins" user, or should I be getting Jenkins to run as my "django" user? I've seen mention if a HUDSON_USER in a newsgroup post, but I can't find reference to this in the docs.

Many thanks!

Ludo.

解决方案

I have not worked with Github and so this answer may not apply at all, but we do use Jenkins and we use both CVS & Subversion for source control.

In our system, we use different username/password combinations for all three (Jenkins, CVS, Subversion), and it has had no adverse effects yet (it has been a year since we deployed Hudson - currently building 50+ projects).

As long as you can get Jenkins to access the repo using your github deploy key, you shouldn't have to change Jenkins to run as django, or create a jenkins user key for github. Personally, I would keep them separate.

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

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