New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pilot fails using environment variables on GitHub #18655
Comments
same with me. It also happen when using p8 file directly. |
Hey m8, Still drives me nuts I cannot do this by simply setting the environment variables! |
I refuse to check my private key into a git repo in any form, is there another workaround anyone has found? Or can the ENV variable be the JSON file? |
Seemed to work with KEY_CONTENT as a Github Secret. P.S. - This using the latest Firebase. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with This issue will be auto-closed if there is no reply within 1 month. |
As a data point, I was getting this exact same error, but it simply ended up being a typo in how I was threading through my secrets through from the repo secrets -> action workflow -> env vars. This is now working perfectly for me, loading the raw contents of my .p8 file via a GitHub Secret. Here's the relevant bits of my setup: Fastfile app_store_connect_api_key(
key_id: ENV["APP_STORE_CONNECT_KEY_ID"],
issuer_id: ENV["APP_STORE_CONNECT_ISSUER_ID"],
key_content: ENV["APP_STORE_CONNECT_KEY"]
) Workflow YAML file: - name: Build
shell: bash
run: bundle exec fastlane beta
env:
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }}
...
This works great for me, despite not escaping newlines like @markemer is. |
I am also having the exact same problem. At one point I managed to fix it on one computer by encoding the p8 key and using the encoded key. But now I am trying to run using TestFlight and a remote cmdline call to the same computer and the problem is back :( Just as rocSank) describes I have tried all the above avenues. So frustrating. I wish the error was more informative. What is a curve anyways? |
Another option could be to base64 encode your key, set it as a secret on Github, and then decode it into a file. Example: - name: Setup Secret
env:
APP_STORE_KEY: ${{ secrets.APP_STORE_KEY }}
run: |
echo "$APP_STORE_KEY" | base64 -d > appstorekey.p12 |
I've got the same issue : Tried with bundle, without, using je json file, the app_store_connect_api_key, both with escaping, double escaping and without, base64... Could not find a way to get it working (was ok and probably broke since an apple auto-update_ |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with This issue will be auto-closed if there is no reply within 1 month. |
this only works for me |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with This issue will be auto-closed if there is no reply within 1 month. |
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍 |
New Issue Checklist
Issue Description
When I run my fastlane command on my local computer it works but it won't in GitHub.
Both have the same version number: 2.181.0
I tried to put the content of APP_STORE_CONNECT_API_KEY_KEY in various ways:
Where I encoded the content I also set
APP_STORE_CONNECT_API_KEY_IS_KEY_CONTENT_BASE64
to true.To create a single line base64 encoded string I used the following command:
cat AuthKey_XXXXXXXXX.p8 | openssl base64 -A
Command executed
I run the following command:
fastlane ios testflight_release
I have a Fastfile with a lane containing the following actions:
The secret parameters are set via environment variables such as:
The following parameters are also set via env variables:
The GiHub Action looks like this:
Complete output when running fastlane, including the stack trace and command used
Environment
The text was updated successfully, but these errors were encountered: