- "Error 500"
- "Signing key cannnot be empty"
- Type:
general_unknown
I will provide an error trace.
Something is wrong with the private key you put in the .env file
I see, so something is wrong with the _APP_VCS_GITHUB_PRIVATE_KEY env variable?
I have it currently reading like this :
`
_APP_VCS_GITHUB_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nMEEEpAEEEEEEEE\nEEEEE\nKL4LEFQ==\n-----END RSA PRIVATE KEY-----"
Obviously not the full key but I noticed inside the error trace, it shows -----BEGIN RSA PRIVATE KEY-----n with an additional ? Could that be it?
possibly...can you try running this:
#!/bin/sh
CODE='
if (openssl_pkey_get_private(getenv("_APP_VCS_GITHUB_PRIVATE_KEY")) === false) {
echo "Invalid Private Key\n";
exit(1);
} else {
echo "Valid Private Key\n";
exit(0);
}'
docker compose exec appwrite php -r "$CODE"
it looks like that in your .env file?
if you run docker compose exec appwrite vars you should see the variable output into multiple lines. is that what you see?
here's also a script to format the private key:
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 <path to private key file>"
exit 1
fi
awk '{printf "%s\\n", $0} END {print "\n"}' $1 | head -n 1 | sed 's/^/_APP_VCS_GITHUB_PRIVATE_KEY="/g' | sed 's/$/"/g'
I am not using an env file I am currently passing the variables through portainer.
ugh...portainer...
try this script
Okay now going to run the code
I see it saying invalid private key, hmm
Um that's not the right way to execute the script...
Yeah xD I am doing that next
Anyways...try copying and pasting the private key into portainer without any tweaks
I tried to save it as a docker swarm secret and still seem to be having issues with it.
Granted its not a big deal , I could just deploy from the github repo directly
somewhere along the way, some formatting is getting screwed up
From my experience this tends to be an issue with multi-line environmental variables. I could hard code it in but that isnt worth the security risk.
Recommended threads
- Can't really use the S3 storage device
hi, I've linked my local MinIO Instance (it's just for testing, not for prod.) to my appwrite instance, when i'm uploading a file it's getting uploaded to the S...
- Next.js SSR Site Times Out on First Visi...
Hey everyone, I'm running a Next.js SSR site on a self-hosted Appwrite server (v1.9.0), and I've noticed a strange behavior that I'm hoping someone can help me...
- Appwrite migration stuck on pending
Migration an existing self hosted 1.9.0 to a new VPS tuning self hosted 1.9.0.. import data recognises the api url, project id and api and then when I create, i...