LoginSignup
7
5

More than 5 years have passed since last update.

Jenkinsの行列セキュリティ設定に失敗してどうにもならなくなった場合のリカバリ方法

Last updated at Posted at 2016-04-07

Jenkinsのセキュリティ設定に失敗した時のリカバリ方法

はじめに

こちらの記事などを参考にJenkinsのセキュリティ設定を「行列による権限設定」で行った際に、誤って設定してしまい、ログイン後の画面に以下メッセージが出てどうにもならなくなった時のリカバリ方法のメモです。

エラーメッセージ

アクセスできません
hoge には、全体/Read パーミッションがありません。

環境

OS Jenkins ver.
OSX Yosemite 1.616
CentOS6.7 1.656

リカバリ手順

JenkinsをインストールしたアカウントかサーバのrootアカウントでサーバへsshログインしてJENKINS_HOME配下で$ vi config.xmlなど設定ファイル直接編集してリカバリします。

OS/インストール方法 JENKINS_HOME
OSXでbrew などでインストールした場合のパス ~/.jenkins
CentOSでyumやrpmなどでインストールした場合のパス /var/lib/jenkins

変更前config.xmlの抜粋

  <authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy"/>

または、

  <authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy">
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Create:hoge</permission>
中略
  </authorizationStrategy>

これを以下のように変更して、Jenkinsを再起動します。

変更後config.xmlの抜粋

 <authorizationStrategy class="hudson.security.AuthorizationStrategy$Unsecured"/>

参考

ちょっと調べたら公式のwikiにもやり方が載っていましたね。。。

7
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
5