-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Unable to load app private key on Heroku #51
Comments
@clstaudt when you paste the private key into the env var value field, make sure to remove any trailing spaces on every line, not just beginning and end. This is the only mistake I observed in the past — people copying the key from the terminal and it becomes corrupted because with some terminals/envs, you'd be copying extra whitespaces. It's hard to spot them visually so try using |
OTOH, I don't remember if I use Python 3.11 for any of my apps currently. So I'd try downgrading CPython and maybe the |
Downgrading Python to 3.10 didn't help. |
@webknjaz Here is the string for the (revoked) key. I am not sure if there is a formatting issue.
|
@clstaudt are those |
You should copy the value from the PEM file as is, with zero modifications. Heroku UI allows having multiline env var values. |
@webknjaz Thanks, that was the issue. (I trusted GPT4 too much, which was absolutely certain that the line breaks must be escaped and even generated an |
Yeah, that depends on the env. From what I saw, things like Heroku/openshift/k8s are able to accept non-escaped values. And things that read from dotenv or other text file format, may need escaping and that escaping may differ depending on the underlying lib. Some do need escapes, others need EOL escaped but not literals, some need to just be quoted. I've been meaning to replace the underlying library for dotenv for a while and I believe the new lib will need quoting and less escaping. |
Strange times for coding productivity: I spent about as much time on debugging this line break issue as on building and deploying my first minimal Github bot using octomachinery. Which now works, by the way. Thanks to ChatGPT4 for suggesting this library. |
There is some truth to the meme but in general GPT4 is performing impressively well. This is one of the rare cases where it led me astray and was unable to spot its own mistake. Very interested in evaluating other models for this project of mine (https://github.com/trIAgelab/trIAge). |
I am trying to pass the private key of the Github app to the octomachinery code via a Heroku config var. I am getting this error:
The text was updated successfully, but these errors were encountered: