-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Configure github app pem file from environment variable #1636
Comments
As workaround I've created an image which replace the entrypoint file to execute a command before startup. ARG ATLANTIS_VERSION
FROM runatlantis/atlantis:$ATLANTIS_VERSION
RUN sed '/^exec.*/i echo "$ATLANTIS_GH_KEY_VALUE" > $ATLANTIS_GH_APP_KEY_FILE' /usr/local/bin/docker-entrypoint.sh |
The api we use specifically requires a file. https://github.com/runatlantis/atlantis/blob/master/server/events/vcs/github_credentials.go#L131 but looks like there's another api available from that library that uses the bytes directly so probably something that can be added. |
Hi, I am trying to use the environment variable Error: initializing server: error initializing github authentication transport: could not parse private key: invalid key: Key must be a PEM encoded PKCS1 or PKCS8 key How is it configured:
The string looks ok to the naked eye, but it's not parsed correctly. |
Did you figure it out @vitaly-dt ? |
@barth12 No, I had to mount the key and reference its path for Atlantis. |
I think this is still broken. It must be a bug. |
Also face the same issue. No matter how I format the PEM key ENV the error is still the same:
|
In a containerized environment you can spin up a second side-car container that mounts the same volume as atlantis and writes the key to a pem file. When using https://github.com/terraform-aws-modules/terraform-aws-atlantis on ECS Fargate it would look like:
|
I'm using atlantis in ECS fargate directly from atlantis docker hub, now I need set the github app pem file, but I want use environment variable to easy configuration from AWS SSM Parameter Store.
Is it possible without customize the image?
If no, would be nice to have.
The text was updated successfully, but these errors were encountered: