fastlane: Codesign fails both on local system and CI System
I am trying to create the temporary keychain and install p12 certificate into that keychain. In the process of building, the building process is blocked at codesign level by asking the dialog to enter the login chain password and allow/deny option.

Here is fastfile content :
fastlane_version "2.49.0"
default_platform :ios
before_all do
ENV["CERTIFICATE_PASSWORD"] = "xyz"
ENV["KEYCHAIN_NAME"] = "fastlane"
end
before_each do |lane, options|
create_keychain(
name: ENV["KEYCHAIN_NAME"],
default_keychain: true,
unlock: true,
timeout: 3600,
lock_when_sleeps: true,
password:"123456"
)
end
def remove_keychain
begin
delete_keychain(name: ENV["KEYCHAIN_NAME"] )
rescue => exception
UI.error("key chain not found")
#raise exception
end
end
after_each do |lane, options|
puts "after each :"
remove_keychain
end
error do |lane, exception|
remove_keychain
end
desc "This will generate production variant build"
private_lane :build_app do |options|
import_certificate(
certificate_path: options[:certificate_path],
certificate_password: options[:certificate_password],
keychain_name: ENV["KEYCHAIN_NAME"],
keychain_password:"123456",
log_output:true
)
sigh(
#skip_certificate_verification:true
app_identifier: options[:app_identifier],
adhoc: options[:adhoc],
provisioning_name: options[:provisioning_name],
filename: options[:profile],
team_id: options[:team_id]
)
gym(
# Build your app - more options available
scheme: options[:scheme]
)
end
🚫 fastlane environment 🚫
Stack
| Key | Value |
|---|---|
| OS | 10.13.1 |
| Ruby | 2.2.4 |
| Bundler? | false |
| Git | git version 2.13.5 (Apple Git-94) |
| Installation Source | ~/.fastlane/bin/bundle/bin/fastlane |
| Host | Mac OS X 10.13.1 (17B48) |
| Ruby Lib Dir | ~/.fastlane/bin/bundle/lib |
| OpenSSL Version | OpenSSL 1.0.2g 1 Mar 2016 |
| Is contained | false |
| Is homebrew | true |
| Is installed via Fabric.app | false |
| Xcode Path | /Applications/Xcode.app/Contents/Developer/ |
| Xcode Version | 9.0 |
System Locale
| Variable | Value | |
|---|---|---|
| LANG | en_US.UTF-8 | ✅ |
| LC_ALL | en_US.UTF-8 | ✅ |
| LANGUAGE | en_US.UTF-8 | ✅ |
fastlane files:
No Fastfile found
No Appfile found
fastlane gems
| Gem | Version | Update-Status |
|---|---|---|
| fastlane | 2.62.1 | 🚫 Update available |
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
| Gem | Version |
|---|---|
| slack-notifier | 1.5.1 |
| CFPropertyList | 2.3.5 |
| claide | 1.0.2 |
| colored2 | 3.1.2 |
| nanaimo | 0.2.3 |
| xcodeproj | 1.5.3 |
| rouge | 1.11.1 |
| xcpretty | 0.2.6 |
| terminal-notifier | 1.7.1 |
| unicode-display_width | 1.1.3 |
| terminal-table | 1.7.3 |
| plist | 3.2.0 |
| public_suffix | 2.0.5 |
| addressable | 2.5.1 |
| multipart-post | 2.0.0 |
| word_wrap | 1.0.0 |
| tty-screen | 0.5.0 |
| babosa | 1.0.2 |
| colored | 1.2 |
| highline | 1.7.8 |
| commander-fastlane | 4.4.5 |
| excon | 0.55.0 |
| faraday | 0.12.1 |
| unf_ext | 0.0.7.4 |
| unf | 0.1.4 |
| domain_name | 0.5.20170404 |
| http-cookie | 1.0.3 |
| faraday-cookie_jar | 0.0.6 |
| fastimage | 2.1.0 |
| gh_inspector | 1.0.3 |
| json | 1.8.1 |
| mini_magick | 4.5.1 |
| multi_json | 1.12.1 |
| multi_xml | 0.6.0 |
| rubyzip | 1.2.1 |
| security | 0.1.3 |
| xcpretty-travis-formatter | 0.0.4 |
| dotenv | 2.2.0 |
| bundler | 1.14.6 |
| faraday_middleware | 0.11.0.1 |
| uber | 0.0.15 |
| declarative | 0.0.10 |
| declarative-option | 0.1.0 |
| representable | 3.0.4 |
| retriable | 2.1.0 |
| mime-types-data | 3.2016.0521 |
| mime-types | 3.1 |
| little-plugger | 1.1.4 |
| logging | 2.2.2 |
| jwt | 1.5.6 |
| memoist | 0.15.0 |
| os | 0.9.6 |
| signet | 0.7.3 |
| googleauth | 0.5.1 |
| httpclient | 2.8.3 |
| google-api-client | 0.13.6 |
generated on: 2017-11-27
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (7 by maintainers)
I tested now by adding the below lines before the gym method.
unlock_keychain( # Unlock an existing keychain and add it to the keychain search list path: ENV[“KEYCHAIN_NAME”] , password: “123456”, set_default: true )
but the issue still exists(Still asking the above dialog)