fastlane-old / credentials_manager

Password Manager which is used in fastlane tools

Home Page:https://fastlane.tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow credentials manager to not prompt for password

ben-lings-tessella opened this issue Β· comments

When running on a CI server, I never want to be prompted for a password. Would it be possible to add a configuration option so that when I run fastlane on the server, it will just fail the build if the password doesn't exist or is invalid?

@ben-lings-tessella Yes, I'd love that. I'm not 100% sure how to approach it though. Do you know a reliable way to detect if fastlane is currently running on a system with no user inputs?

I don't know of a way to detect that. Would setting an environment variable be an option (e.g. FASTLANE_NO_PROMPTS=1)?

commented

In an Xcode Server environment ruby -e "STDOUT.isatty" will return false when run as part of a post integration script and true when run directly from an interactive terminal.

I am not aware of a simple cross-platform cross CI server way to detect that a program is running inside a CI environment.

I would go for a generic environmemt variable, a la FASTLANE_NO_PROMPTS, implemented in the top foremost project (which seems to be credentials_manager).

Detecting if it's a CI service it already part of fastlane using Helper.ci?, but there might be various reasons for not having a user input, right?

What is the status on this?

Would it be possible with the below env variables?

FASTLANE_USER
FASTLANE_PASSWORD
FASTLANE_DONT_STORE_PASSWORD

Yes, these are the exact environment variables you'll need @kevinbaker-gpsw πŸ‘

Hi! It would be nice to fail the lane if no password is provided by .env or environment variables.

@yakimant on the other hand it should ask for username and password if nothing is provided πŸ˜‰

Is there any way to reliably detect if the currently running process is not controlled by a user?

@orta thanks, I just added https://github.com/fastlane/fastlane_core/blob/feature/messaging/lib/fastlane_core/ui/implementations/shell.rb#L74-L79, which should be in the next fastlane_core release. What do you think?

Yep, I bet that's good enough πŸ‘

Going to close this issue as it was addressed in fastlane_core in December. πŸ‘

This issue was migrated to fastlane/fastlane#3325. Please post all further comments there.

fastlane is now a mono repo, you can read more about the change in our blog post. All tools are now available in the fastlane main repo πŸš€