Skip to content
Back

[SOLVED] "Signing key cannot be empty" Appwrite 1.4.1 VCS_GITHUB

  • 0
  • Self Hosted
  • Functions
  • Webhooks
QuadWord
1 Sep, 2023, 18:25

After creating my GitApp and configuring the .env variables and checking "Request user authorization (OAuth) during installation" in the GitApp (which is not mentioned in the docs but was suggested by @Steven to solve the "Github 404 after authorizing app" issue (https://discord.com/channels/564160730845151244/1146963381312553051) the first configured callback link is triggered by GitHub (http://[HOSTNAME_OR_IP]/v1/vcs/github/callback) but on the Appwrite side it shows:

Error 500 Signing key cannot be empty Type general_unknown

TL;DR
Solution: The issue was that the signing key for the Appwrite 1.4.1 VCS_GITHUB integration was not set properly. The key needed to be placed on one line, and any newlines should be replaced with \n. Additionally, make sure there are no spaces after the '-----BEGIN RSA PRIVATE KEY-----' line. The key should be enclosed in double quotes in the .env file.
Drake
1 Sep, 2023, 18:29

Did you set _APP_VCS_GITHUB_PRIVATE_KEY? if so, please DM me the ouptut of docker compose exec appwrite vars

QuadWord
1 Sep, 2023, 19:08

I did send you my vars output and the comparison screenshot from the GitApp setup for _APP_VCS_GITHUB_PRIVATE_KEY

QuadWord
1 Sep, 2023, 19:21

Here my logs. Basically the same state as @SenZi got into in: https://discord.com/channels/564160730845151244/1146963381312553051

Drake
1 Sep, 2023, 21:33

"Signing key cannot be empty" Appwrite 1.4.1 VCS_GITHUB

QuadWord
1 Sep, 2023, 21:33

Solved: Basically when i created the private key for the GitApp i got a .pem file automatically downloaded. The download was so fast on my machine that it was barely noticable. So i thought the immediate displayed "SHA256:Z7oYDm2D1..." was the key. I needed to open the .pem to copy-paste the content to my .env file. Since it is multiline it needs to be in double-quotes:

_APP_VCS_GITHUB_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY----- MIIEpAIBAAKCAQEAqGjCVJ7p6X6r2YQt9uJ/HvXugS+/kQoR27gPG29WZnzNuv3i ZcudTuELlUCOITp0UhCTQ52PpysSQpoeLcq0Tg4gQFkOKrJXOojolxoqlFxI/5OI ... -----END RSA PRIVATE KEY-----"

SenZi
1 Sep, 2023, 21:43

Is there any space afer -----BEGIN RSA PRIVATE KEY-----

Drake
1 Sep, 2023, 21:55

copy and paste the key in exactly and it'll work

SenZi
1 Sep, 2023, 21:56

worked! finally

Drake
8 Sep, 2023, 14:28

So ideally, you would put the key on one line because upgrades don't handle new lines well. So you can replace every newline with \n

Drake
8 Sep, 2023, 14:28

[SOLVED] "Signing key cannot be empty" Appwrite 1.4.1 VCS_GITHUB

QuadWord
8 Sep, 2023, 16:48

That was my original thought but then you presented the much simpler doublequote solution. I will probably change it when i install the next update but i fear others might have already followed the same approach/solution. Maybe a adjustment on the upgrade code may be the more elegant solution,.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more