Back

github functions

  • 0
  • Self Hosted
Ryan
6 Feb, 2024, 20:32

Also, is this in the .env file or the docker-compose.yml file?

TL;DR
Developers are having issues with the Github functions and are encountering error messages related to signing key and bad credentials. They are unsure about where to look for log errors. Another developer suggests checking the `.env` file and ensuring that the signing key is correctly formatted with line breaks replaced by `\n`. They also mention following the self-hosted setup for Github in the documentation. No solution is provided in the thread.
Camo
6 Feb, 2024, 20:35

.env

Camo
6 Feb, 2024, 20:35

im trying out now different versions of copying it

Camo
6 Feb, 2024, 20:36

as a string, without and with quatations, with or without the space, and with or with out the /n, so far same results

Camo
6 Feb, 2024, 20:37

when i do docker-compose exec appwrite vars should look like this ?

Camo
6 Feb, 2024, 20:37

with a space in between ?

Camo
6 Feb, 2024, 20:37

because of the \n

Ryan
6 Feb, 2024, 20:39

Mine shows like this

Ryan
6 Feb, 2024, 20:40

In my .env I've got it all wrapped in ", on one line and with \n replacing any line breaks

Camo
6 Feb, 2024, 20:45

ok so i do this, i paste in pycharm, do ctrl+a, and do join lines

Camo
6 Feb, 2024, 20:45

how many breaks did you have?

Camo
6 Feb, 2024, 20:45

by line breaks you mean you replaced space in the joined string?

Camo
6 Feb, 2024, 20:46

in the file there is last space after the end of the rsa, did you add that as line break as well ?

Ryan
6 Feb, 2024, 20:47

So mine went from this:

TypeScript
-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQCDjhu9Pb21hLHi49cW1OkBwhqVwJYu/HopUIBUi4srSQgO21+6
2r7htr7Nmmok70mptImZl6LKv8Bers916t3BLp4YYrxcOGwSIw9LjYHTp9c+OYzX
...

to this:

TypeScript
-----BEGIN RSA PRIVATE KEY-----\nMIICXAIBAAKBgQCDjhu9Pb21hLHi49cW1OkBwhqVwJYu/HopUIBUi4srSQgO21+6\n2r7htr7Nmmok70mptImZl6LK...
Camo
6 Feb, 2024, 20:48

ok will try it out, thanks

Camo
6 Feb, 2024, 20:52

i do this before join

Camo
6 Feb, 2024, 20:52

and wrap in "" after join, i get the same result after it.

Camo
6 Feb, 2024, 20:53

where do i look for the log errors ?

Binyamin
6 Feb, 2024, 20:57
TypeScript
docker logs appwrite
docker logs openruntimes-executor
docker logs appwrite-worker-functions
Camo
6 Feb, 2024, 20:58
TypeScript
[Error] Method: GET
[Error] URL: /v1/vcs/github/callback
[Error] Type: Ahc\Jwt\JWTException
[Error] Message: Signing key cannot be empty
[Error] File: /usr/src/code/vendor/adhocore/jwt/src/ValidatesJWT.php
[Error] Line: 34
[Error] Timestamp: 2024-02-06T20:54:01+00:00
[Error] Method: GET
[Error] URL: /v1/vcs/github/callback
[Error] Type: Ahc\Jwt\JWTException
[Error] Message: Signing key cannot be empty
[Error] File: /usr/src/code/vendor/adhocore/jwt/src/ValidatesJWT.php
[Error] Line: 34
[Error] Timestamp: 2024-02-06T20:55:20+00:00
[Error] Method: GET
[Error] URL: /v1/vcs/github/callback
[Error] Type: Appwrite\Auth\OAuth2\Exception
[Error] Message: Bad credentials: No description
[Error] File: /usr/src/code/src/Appwrite/Auth/OAuth2.php
[Error] Line: 212```
Binyamin
6 Feb, 2024, 20:58

Is the signing key is in one line?

Camo
6 Feb, 2024, 20:59

yes its one big string

Ryan
6 Feb, 2024, 20:59

Have you restarted the containers after making the change?

Camo
6 Feb, 2024, 21:00

hmm, i did not the last few times, because i saw the variables being updated anyways

Camo
6 Feb, 2024, 21:00

let me try to do down and up again

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