How to pass a password to 'fastlane match appstore --readonly'

I’m new to CircleCI and I’m having a code signing issue on OSX build. I have MATCH_PASSWORD and FASTLANE_PASSWORD set in my config.yml and when I run “bundle exec fastlane match appstore --readonly” I get the following error.

INFO [2019-03-12 14:53:19.37]: ▸ Cloning into ‘/var/folders/yy/d215g62s727f4w2137t9jl2m0000gn/T/d20190312-824-595hk3’…
INFO [2019-03-12 14:53:19.77]: ▸ fatal: could not read Password for ‘https://myuser@bitbucket.org’: terminal prompts disabled
Cloning into ‘/var/folders/yy/d215g62s727f4w2137t9jl2m0000gn/T/d20190312-824-595hk3’…
fatal: could not read Password for ‘https://myuser@bitbucket.org’: terminal prompts disabled

Am I using the wrong variable? Any suggestions (even one you think may be obvious) would be greatly appreciated.

It looks like you’re trying to connect to git over https:

https://myuser@bitbucket.org/

This is not supported because it requires password input. Since CI runs in a non-interactive terminal you cannot pass in password input. Instead you should use the ssh option of git and use a public/private key pair to authenticate.

Hi Levlaz,

Thanks a lot for the response, that makes complete sense. I tried ssh before and it failed but since my build is able to check out my app code successfully I didn’t think the failure was key related … so I switch match to use use https … so I caused my new own problem :slight_smile:
Switching back to ssh I now get

git clone git@bitbucket.org:MyBitBucketAcountName/apple-certificates.git /var/folders/yy/d215g62s727f4w2137t9jl2m0000gn/T/d20190313-850-icpaec INFO [2019-03-13 13:17:22.79]: ▸ Cloning into '/var/folders/yy/d215g62s727f4w2137t9jl2m0000gn/T/d20190313-850-icpaec'... INFO [2019-03-13 13:17:23.23]: ▸ Warning: Permanently added the RSA host key for IP address '18.205.93.1' to the list of known hosts. INFO [2019-03-13 13:17:23.48]: ▸ repository access denied. deployment key is not associated with the requested repository.

In my Matchfile I also have my username set as username("developer@MyBitBucketAcountName.org") which is the user which created the private repo of MyBitBucketAcountName/apple-certificates.git

Do you happen to know if this issue is on the circleci side or something I’m missing on bitbucket?

Thanks again for your help.

Found this … CircleCI submodule repository access denied. deployment key is not associated with the requested repository … and yes I was missing the key in the bitbucket repo. Thanks for getting me on the right track. Copying over the key I had in my app repo to my cert repo got me further. Now I’m getting …

error: No signing certificate "iOS Distribution" found: No "iOS Distribution" signing certificate matching team ID "S6FD9xxxxx" with a private key was found. (in target 'MyApp'). My cert repo looks like; (no passphase on the certs).

/certs/distribution/certificate_8LS6Bxxxxx.cer
/certs/distribution/certificate_8LS6Bxxxxx.p12
/profiles/adhoc/AdHoc_my_bundle_id.mobileprovision
/profiles/appstore/AppStore_my_bundle_id.mobileprovision`