fastlane: FASTLANE_USER and FASTLANE_PASSWORD values are missing in Fastfile environment

I would like to use Fastlane user and passwords in the Fastfile but I can’t get theirs values from the environment. I already saved the users password with the credentials_manager.

Here is code:

scp(
  username: ENV["FASTLANE_USER"],
  password: ENV["FASTLANE_PASSWORD"],
  host: "awesomeserver.com",
   upload: {
    src: "app.ipa",
    dst: "/some/directory/"
  }
)

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (4 by maintainers)

Most upvoted comments

I’m pretty sure that documentation is saying that you can specify the username and password using environment variables, not saying that the environment variables will be set to the entered (or retrieved from keychain) credentials. Looking at the code, that also looks like the intention.

We use it to specify the creds in a Travis CI environment.

I have to echo tomassliz’s comments. According to the CredentialsManager documentation, FASTLANE_USER and FASTLANE_PASSWORD are accessible as environment variables:

https://github.com/fastlane/fastlane/tree/master/credentials_manager

How do we use these environment variables in lanes? I get an error if I add this to a lane:

puts ENV[‘FASTLANE_USER’]

Maybe I have this backwards. Is FASTLANE_USER exposed as an environment variable so we can overwrite it in a CI or multi-user environment?

Is this documented somewhere?