'Jenkins' user is not created on OS X install

前端 未结 1 1652
后悔当初
后悔当初 2021-01-14 00:29

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 tas

相关标签:
1条回答
  • 2021-01-14 00:58

    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 DOES NOT create a jenkins user on Mac OS (nor should it ever, imo).

    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)

    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.

    Try this in terminal/iTerm:

    sudo chown whoami /Library/LaunchDaemons/homebrew.mxcl.jenkins.plist

    also whoami should be surrounded by ticks `

    I tend to just do these commands after a brew install jenkins

    ln -sfv /usr/local/opt/jenkins/*.plist ~/Library/LaunchAgents

    Symlink the Jenkins plist files to /Library/LaunchAgents

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

    Copy plist files to /Library/LaunchDaemons

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

    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

    Here's something to refer to:

    http://flummox-engineering.blogspot.com/2016/01/installing-jenkins-os-x-homebrew.html

    0 讨论(0)
提交回复
热议问题