XCTEQ / fastlane-plugin-altool

Fastlane plugin to upload ipa files to iTunes Connect using alto
MIT License
29 stars 13 forks source link

Hide password from console. #2

Closed thii closed 6 years ago

thii commented 6 years ago

From altool -h:

-p, --password
Password. Required if username specified.  Password is read from stdin if one is not supplied.
May use @keychain: or @env: prefixes followed by the keychain or environment variable lookup name.
e.g. -p @env:SECRET which would use the value in the SECRET environment variable.
Shashikant86 commented 6 years ago

Thanks @thii Sounds like a great idea. Not sure why console ask users to type even ENV[FASTLANE-USER] and ENV[FASTLANE_PASSWORD] are set. Let's see if that idea work DO you have any other mechanism to automate this process i.e username and password?

thii commented 6 years ago

Probably that's how fastlane handles the special FASTLANE_PASSWORD environment variable. Changing the altool_password parameter to optional seems to work for me.

Btw, I also wrote a plugin that uses altool. It takes username from Appfile and password from Keychain. Please take a look: https://github.com/thii/fastlane-plugin-validate_app/blob/master/lib/fastlane/plugin/validate_app/actions/validate_app_action.rb

Shashikant86 commented 6 years ago

Thanks a lot @thii I did the quick test and it doesn't seem to be working.

$ /Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool --upload-app -t ios -f ./build/dummy.ipa -u t@t.com -p @env:ALTOOL_PASSWORD --output-format normal

even I set environmental variable

Shashikant86 commented 6 years ago

It doesn't use value in FASTLANE_PASSWORD for some reason. Have a look at above command

thii commented 6 years ago

The value of FASTLANE_PASSWORD env var got set to the ALTOOL_PASSWORD env var, so isn’t the above command the expected output?