Fastlane: Using only env variable for password, not keychain. Is it normal behavior?

Created on 21 Nov 2016  ยท  3Comments  ยท  Source: fastlane/fastlane

New Issue Checklist

Issue Description

I have password in env variable FASTLANE_PASSWORD, but for another apple_id. And have password for apple_id in keychain (created with credentials_manager). Fastlane only try to use env variable. Is it OK behaviour?

Environment

Please run fastlane env and copy the output below. This will help us help you :+1:
If you used --capture_output option please remove this block - as it is already included there.

Captured Output

Command Used: env

Output/Log


[00:21:10]: Generating fastlane environment output, this might take a few seconds...
<details><summary>๐Ÿšซ fastlane environment ๐Ÿšซ</summary>

### Stack

| Key                 | Value                                       |
| ------------------- | ------------------------------------------- |
| OS                  | 10.11.6                                     |
| Ruby                | 2.3.3                                       |
| Bundler?            | false                                       |
| Git                 | git version 2.8.4 (Apple Git-73)            |
| Installation Source | /Users/ci/.gem/ruby/2.3.0/bin/fastlane      |
| Host                | Mac OS X 10.11.6 (15G1004)                  |
| Ruby Lib Dir        | /usr/local/Cellar/ruby/2.3.3/lib            |
| OpenSSL Version     | OpenSSL 1.0.2j  26 Sep 2016                 |
| Is contained        | false                                       |
| Xcode Path          | /Applications/Xcode.app/Contents/Developer/ |
| Xcode Version       | 8.0                                         |


### System Locale

| Error                       |
| --------------------------- |
| No Locale with UTF8 found ๐Ÿšซ |


### fastlane files:

<details><summary>`./fastlane/Fastfile`</summary>

```ruby
opt_out_usage
default_platform :ios

import_from_git(
  url: "https://vcs.proitr.ru/dots-mobile/ci-stuff.git",
  path: "fastlane/Fastfile"
)

platform :ios do

  ############### PREPARE FOR ALL LANES ###############################

  before_all do |lane|
    lane_context[:SCHEME_PROD] = "IceRinks"
    lane_context[:SCHEME_DEV] = "IceRinks-dev"
    lane_context[:PORTAL_ID_PROD] = 48
    lane_context[:PORTAL_ID_DEV] = 40
  end

  ############### CUSTOM LANES ########################################

  lane :delivery_to_appstore do
    sigh
    ENV["PROFILE_UUID"] = lane_context[SharedValues::SIGH_UDID]
    gym(
      scheme: "IceRinks",
      clean: true,
      include_bitcode: false,
      output_directory: "./build/",
      output_name: "IceRinks.ipa",
      use_legacy_build_api: true
    )
    resign(
      ipa: './build/IceRinks.ipa',
      signing_identity: 'iPhone Distribution: Sergey Kozyrev (LEPFKXLP5W)',
      provisioning_profile: './AppStore_ru.proitr.IceRinks.mobileprovision'
    )
    pilot(
      ipa: lane_context[:IPA_OUTPUT_PATH],
      skip_submission: true,
    )
  end

  lane :screenshots do
    snapshot
    deliver
  end

end

./fastlane/Appfile

app_identifier "ru.proitr.IceRinks"
apple_id "[email protected]"

fastlane gems

| Gem | Version | Update-Status |
| ------------------- | ------- | ------------- |
| credentials_manager | 0.16.2 | โœ… Up-To-Date |
| fastlane_core | 0.56.0 | โœ… Up-To-Date |

Loaded fastlane plugins:

No plugins Loaded

Loaded gems

| Gem | Version |
| ------------------- | ------- |
| did_you_mean | 1.0.0 |
| json | 1.8.3 |
| multi_json | 1.12.1 |
| highline | 1.7.8 |
| colored | 1.2 |
| commander | 4.4.0 |
| babosa | 1.0.2 |
| excon | 0.53.0 |
| rubyzip | 1.1.7 |
| plist | 3.1.0 |
| terminal-table | 1.4.5 |
| gh_inspector | 1.0.2 |
| security | 0.1.3 |
| credentials_manager | 0.16.2 |
| fastlane_core | 0.56.0 |
| io-console | 0.4.5 |
| i18n | 0.7.0 |
| thread_safe | 0.3.5 |
| tzinfo | 1.2.2 |
| minitest | 5.8.5 |
| activesupport | 4.2.7.1 |
| claide | 1.0.1 |
| xcodeproj | 1.3.2 |
| bundler | 1.13.5 |
| word_wrap | 1.0.0 |

generated on: 2016-11-22

md5-0863c118dcc66e223ea3c21639207ca8

./fastlane/Appfile

app_identifier "ru.proitr.IceRinks"
apple_id "[email protected]"

fastlane gems

| Gem | Version | Update-Status |
| ------------------- | ------- | ------------- |
| credentials_manager | 0.16.2 | โœ… Up-To-Date |
| fastlane_core | 0.56.0 | โœ… Up-To-Date |

Loaded fastlane plugins:

No plugins Loaded

Loaded gems

| Gem | Version |
| ------------------- | ------- |
| did_you_mean | 1.0.0 |
| json | 1.8.3 |
| multi_json | 1.12.1 |
| highline | 1.7.8 |
| colored | 1.2 |
| commander | 4.4.0 |
| babosa | 1.0.2 |
| excon | 0.53.0 |
| rubyzip | 1.1.7 |
| plist | 3.1.0 |
| terminal-table | 1.4.5 |
| gh_inspector | 1.0.2 |
| security | 0.1.3 |
| credentials_manager | 0.16.2 |
| fastlane_core | 0.56.0 |
| io-console | 0.4.5 |
| i18n | 0.7.0 |
| thread_safe | 0.3.5 |
| tzinfo | 1.2.2 |
| minitest | 5.8.5 |
| activesupport | 4.2.7.1 |
| claide | 1.0.1 |
| xcodeproj | 1.3.2 |
| bundler | 1.13.5 |
| word_wrap | 1.0.0 |

generated on: 2016-11-22

credentials_manager question

Most helpful comment

@Chiliec Yes, this is expected behavior. If the environment variable is set then it is assumed to be the the correct one.

If you are using multiple accounts, you should unset that environment variable and so that _fastlane_ will only get passwords from the keychain. ๐Ÿ”‘

All 3 comments

It seems like this issue might be related to code signing :no_entry_sign:

Have you seen our new Code Signing Troubleshooting Guide? It will help you resolve the most common code signing issues :+1:

@Chiliec Yes, this is expected behavior. If the environment variable is set then it is assumed to be the the correct one.

If you are using multiple accounts, you should unset that environment variable and so that _fastlane_ will only get passwords from the keychain. ๐Ÿ”‘

Okay, thanks!

Was this page helpful?
0 / 5 - 0 ratings