未在OS X安装上创建"Jenkins"用户 [英] 'Jenkins' user is not created on OS X install
问题描述
在阅读有关Jenkins安装的信息时,许多指南都谈到安装程序在OS X上创建了一个名为"Jenkins"的用户.该用户似乎对某些任务很重要. 但是,使用自制软件安装Jenkins 2.32不会在此处安装该用户.为什么会这样-我错过了什么吗?
When reading about Jenkins installation, many guides talk about that the installer created a user called 'Jenkins' on OS X. This user seems to be important for certain tasks. However, installing Jenkins 2.32 using homebrew does not install this user here. Why is that - am I missing something?
背景:我想将CI for iOS与Gitlab服务器一起运行.
Background: I want to run CI for iOS together with a Gitlab server.
推荐答案
通过Homebrew安装的Jenkins有点混乱-之所以这么说,是因为在日志输出中(何人获得许可)这不是很明显.
Jenkins installed via Homebrew is kind of a mess - and I say this because it isn't terribly obvious in the log output where/who gets permissions.
Jenkins不会在Mac OS上创建jenkins用户(imo也不会).
Jenkins DOES NOT create a jenkins user on Mac OS (nor should it ever, imo).
默认情况下,正在积极使用brew install jenkins
的用户是将获得默认权限的用户.该用户的主文件夹中应该有一个/.jenkins
文件夹(例如:/Users/<your_user>/.jenkins
)
By default, the user that was actively using brew install jenkins
is the one who will get the default permissions. There should be a /.jenkins
folder within that users home folder (ex: /Users/<your_user>/.jenkins
)
问题是,当brew
完成运行时,一些应该与活动用户不进行符号链接的文件-因此您可以使用rvm/ruby创建作业,并获取捆绑程序无法写入系统ruby的错误.
The problem is that when brew
finishes running, some files that should get symlinked to the active user don't - so you might create a job using rvm/ruby for example, and get errors that bundler can't write to the system ruby.
在终端机/iTerm中尝试一下:
Try this in terminal/iTerm:
sudo chown
whoami
/Library/LaunchDaemons/homebrew.mxcl.jenkins.plist
sudo chown
whoami
/Library/LaunchDaemons/homebrew.mxcl.jenkins.plist
也whoami
应该用勾号`
我倾向于在brew install jenkins
ln -sfv /usr/local/opt/jenkins/*.plist ~/Library/LaunchAgents
将Jenkins plist文件符号链接到/Library/LaunchAgents
Symlink the Jenkins plist files to /Library/LaunchAgents
sudo cp -fv /usr/local/opt/jenkins/*.plist /Library/LaunchDaemons
将plist文件复制到/Library/LaunchDaemons
Copy plist files to /Library/LaunchDaemons
sudo chown
whoami /Library/LaunchDaemons/homebrew.mxcl.jenkins.plist
将列出的plist文件的sudo所有权完全授予用户
Give sudo ownership of the plist file listed to the user outright
这部分不是必需的...
This part isn't necessary...
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist
以下是要参考的内容:
http://flummox-engineering .blogspot.com/2016/01/installing-jenkins-os-x-homebrew.html
这篇关于未在OS X安装上创建"Jenkins"用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!