Open JesperNJessen opened 2 years ago
I ran into the exactly same issue
I am having the same problem, did anybody find a work around for this ?
I ran into the exactly same issue
Curious to know if anyone found a workaround for this or pinpointed the issue causing this? Is this happening randomly for everyone?
I've been trying to use the task for a few days, but I end up with the same results as everyone else. The thing is, even if I don't use the task and use the command-line tool instead
xcrun altool --output-format xml --upload-app --file "the-ring.io preprod.ipa" \
--type ios --apiKey ${{ secrets.APPSTORE_API_KEY_ID }} \
--apiIssuer ${{ secrets.APPSTORE_ISSUER_ID }}
I end up with this authentication issue. So something must have changed for this process with the latest XCode version, but I'm having trouble finding what exactly.
But this command-line fails only when ran on a github action agent. Locally on my dev machine it's working fine. So my guess is it has something to do with certificates ?
Hey guys! I split this flow into two steps:
Example of the code:
# CD part
- name: Install private API key P8
env:
PRIVATE_API_KEY_BASE64: ${{ secrets.PRIVATE_API_KEY_BASE64 }}
API_KEY: ${{ secrets.API_KEY }}
run: |
mkdir -p ~/private_keys
echo -n "$PRIVATE_API_KEY_BASE64" | base64 --decode --output ~/private_keys/AuthKey_$API_KEY.p8
- name: Upload app to TestFlight
env:
API_KEY: ${{ secrets.API_KEY }}
API_ISSUER : ${{ secrets.API_ISSUER }}
run: xcrun altool --output-format xml --upload-app -f path/to/your.ipa -t ios --apiKey $API_KEY --apiIssuer $API_ISSUER
thanks @VlasiukVV In my case I have to:
xcrun altool --upload-app -f IPA_FILE.ipa --type ios --apiKey KEY_ID --apiIssuer ISSUER_ID
worked like a charm
Have the same error on XCode 13.4.1.
Looks like this repo is unmaintained now, ~18 months since activity.
Back to using xcrun alttool
manually I guess.
I have been stuck on this for days **"no such file or directory, open '/Users/runner/privatekeys/AuthKey*.p8" . So I even manually placed the p8 file in the directory but still got this issue. Any idea why its happening?
Setting the environment variable API_PRIVATE_KEYS_DIR
to the directory that contains the file also works, although the file still MUST to be named in the format AuthKey_<Key ID>.p8
where Key ID is the one seen in the App Store Connect web UI:
API_PRIVATE_KEYS_DIR=/my/custom/folder xcrun altool --list-apps --apiKey ABC12FGH12 --apiIssuer 424242429-4242-4242-4242-424242424242
Such that you store your key as /my/custom/folder/AuthKey_ABC12FGH12.p8
.
Which is described in the man page for altool:
--apiKey api_key
apiKey. Required for JWT authentication (in lieu of username/password). This option will search the following directories in sequence for a private key file with the name of
'AuthKey_<api_key>.p8': './private_keys', '~/private_keys', '~/.private_keys', and '~/.appstoreconnect/private_keys'. Additionally, you can set the environment variable
$API_PRIVATE_KEYS_DIR or a user default API_PRIVATE_KEYS_DIR to specify the directory where your AuthKey file is located.
--apiIssuer issuer_id
Issuer ID. Required if --apiKey is specified.
I'm getting this error even though I can see my .p8 file in ~/private_keys
Is there something I need to change or do on my mac action runner machine?
Error message:
The file 'AuthKey_***.p8' could not be found in any of these locations: '~/actions-runner/_work/ProjectName/ProjectName/private_keys', '~/private_keys', '~/.private_keys', '~/.appstoreconnect/private_keys'.
Full output:
EDIT: I managed to upload the IPA manually from my mac. The IPA was saved correctly and altool accepted the upload when I did it through the terminal. However, when I try to use my Github Action for this, it always fails with this same error message.
I have included my workflow file here for context: