【问题标题】:'Jenkins' user is not created on OS X install'Jenkins' 用户未在 OS X 安装上创建
【发布时间】:2018-04-10 04:16:24
【问题描述】:

在阅读有关 Jenkins 安装的信息时,许多指南都谈到安装程序在 OS X 上创建了一个名为“Jenkins”的用户。这个用户似乎对某些任务很重要。 但是,使用 homebrew 安装 Jenkins 2.32 不会在此处安装此用户。为什么 - 我错过了什么?

背景:我想将 CI for iOS 与 Gitlab 服务器一起运行。

【问题讨论】:

    标签: xcode macos jenkins


    【解决方案1】:

    通过 Homebrew 安装的 Jenkins 有点乱 - 我之所以这么说是因为在日志输出中从哪里/谁获得权限并不是很明显。

    Jenkins 不会在 Mac OS 上创建 jenkins 用户(也不应该,imo)。

    默认情况下,积极使用brew install jenkins 的用户将获得默认权限。该用户主文件夹中应该有一个/.jenkins 文件夹(例如:/Users/<your_user>/.jenkins)

    问题在于,当brew 完成运行时,一些应该被符号链接到活动用户的文件不 - 所以你可以使用 rvm/ruby 创建一个作业,并获得捆绑器无法写入系统 ruby​​ 的错误。

    在终端/iTerm 中试试这个:

    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

    sudo cp -fv /usr/local/opt/jenkins/*.plist /Library/LaunchDaemons

    将 plist 文件复制到 /Library/LaunchDaemons

    sudo chownwhoami/Library/LaunchDaemons/homebrew.mxcl.jenkins.plist

    将列出的 plist 文件的 sudo 所有权完全授予用户


    这部分不是必须的……

    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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-13
      • 2013-12-21
      • 2010-10-28
      • 2013-08-23
      • 2014-12-14
      • 2011-10-22
      相关资源
      最近更新 更多