This message was deleted.
# atlantis-community
s
This message was deleted.
p
I’m doing this and I pass it as a string and it works just fine
are you sure you are passing the right key?
ahhh no I do not do that right now, I moved to a ParameterStore secret
but I did have a problem like yours before and it was because I used the wrong key
d
According to Github, the PEM file that is generated is PKCS#1 formatted. Based on that, I'm literally just opening that PEM file in notepad++ and copying the contents into my variable value. I know that the key is valid, because if I do copy the key file over and point to it with the ATLANTIS_GH_APP_KEY_FILE variable, then Atlantis loads up just fine.
p
starts with :
Copy code
-----BEGIN RSA PRIVATE KEY-----
d
You bet
p
I used it as a string before in one very long line and I did not have any issues
OHHHHHH
I use
ATLANTIS_GH_APP_KEY
not _FILE
so you think the file parsing is the issue
d
I was just saying that if I pass it the file, then that works, so I know the PEM file is good.
I have tried passing it as one long line and it doesn't take that.
p
ok so the way I have it does not work for you
weird
that version of atlantis?
d
I'm using the latest docker image that they have in the github repo
p
have you enabled debug in atlantis to see if there is any errors?
d
The error is in the original post
p
ok, just saw it
a
@PePe Amengual what was the solution here? @Dustin PR was: https://github.com/runatlantis/atlantis/pull/1706 We are trying to pull the pem string from AWS SecretsManager and we are getting the same error
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
p
I don't think he found a solution
I use an older version of Atlantis 0.20.1 and I pass the env without the _FILE and it works
do you see anything amiss in the code of that PR?
that was merged while back
a
Sorry I just added the PR as a reference