LoginSignup
0
0

More than 5 years have passed since last update.

JenkinsでUser interaction is not allowed.と言われて失敗してしまう

Posted at

Jenkins環境

  • Jenkins v1.656
  • Mac OSX 10.11

Jobのコンソールログ

/usr/bin/codesign --force --sign 99999999999999999999999 --entitlements /Users/niko/jenkins/home/jobs/Sample/workspace/build/Sample.build/Sample.app.xcent --timestamp=none /Users/niko/Library/Developer/Xcode/DerivedData/Sample-aaaaaaaaaaaaaaaaaaaaa/Build/Intermediates/ArchiveIntermediates/Sample/InstallationBuildProductsLocation/Applications/Sample.app
/Users/niko/Library/Developer/Xcode/DerivedData/Sample-aaaaaaaaaaaaaaaaaaaaa/Build/Intermediates/ArchiveIntermediates/Sample/InstallationBuildProductsLocation/Applications/Sample.app: User interaction is not allowed.
Command /usr/bin/codesign failed with exit code 1

** ARCHIVE FAILED **

※パスやプロジェクト名はダミーです

原因

  • ProvisioningProfile更新後に起きた
  • codesignを許可するためのGUIがでないので認証ができないため

対策

1. KeychainをUNLOCKする

security -v unlock-keychain -p ${KEYCHAIN_PASSWORD}

2. codesign をターミナルで実行

  • 1はすでにやっていたが、ダメだった
  • もっとほかにいい方法がありそう
  • コンソールログにあるcodesignの実行コードをJenkinsマシン上でターミナルから実行する
$ /usr/bin/codesign --force --sign 99999999999999999999999 --entitlements /Users/niko/jenkins/home/jobs/Sample/workspace/build/Sample.build/Sample.app.xcent --timestamp=none /Users/niko/Library/Developer/Xcode/DerivedData/Sample-aaaaaaaaaaaaaaaaaaaaa/Build/Intermediates/ArchiveIntermediates/Sample/InstallationBuildProductsLocation/Applications/Sample.app
  • 上記を実行するとJenkinsマシン上にGUIで認証許可のダイアログがでるので、「常に許可」にする
  • ジョブをビルドして確認する
0
0
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
0
0