Back

[SOLVED] Unable to connect to github

  • 0
  • General
Zeke(Jafesu)
4 Sep, 2023, 20:13

this is in the Appwrite container

TL;DR
User was unable to connect to GitHub but managed to solve the issue. They were initially adding unnecessary characters and not removing line returns. The problem was resolved by reformatting the private key. Another user reported a similar issue after upgrading. There was also a suggestion to wait for version 1.4.2 as it contains relevant updates. The thread ended with a request to DM the output of `docker compose exec appwrite vars`.
Zeke(Jafesu)
4 Sep, 2023, 20:17

same thing

Drake
4 Sep, 2023, 20:23

what is this you're showing?

Drake
4 Sep, 2023, 20:24

would you please DM me the output of docker compose exec appwrite vars?

Zeke(Jafesu)
4 Sep, 2023, 21:55

thats my env vars

Zeke(Jafesu)
4 Sep, 2023, 21:55

yeah getting it now

Drake
4 Sep, 2023, 21:58

you said you upgraded or this was a clean install?

Zeke(Jafesu)
4 Sep, 2023, 21:58

Upgrade. Been in production for a while

Drake
4 Sep, 2023, 22:01

hmm you might need to wait for 1.4.2 which will have this: https://github.com/appwrite/appwrite/pull/6125

Zeke(Jafesu)
4 Sep, 2023, 22:02

You think it's an issue with cli?

Drake
4 Sep, 2023, 22:02

no but that PR has a lot of other updates to the migration

Zeke(Jafesu)
4 Sep, 2023, 22:05

Ah okay

unsoop
8 Sep, 2023, 18:10

i update to 1.4.2, and still getting the 500 error.

unsoop
8 Sep, 2023, 18:10

_APP_VCS_GITHUB_PRIVATE_KEY is set as a string with \n and i can see it in the docker compose exec appwrite vars

Drake
8 Sep, 2023, 18:11

please create a new post instead of posting in an old thread

Zeke(Jafesu)
12 Sep, 2023, 16:42

I am also getting the same error after the upgrade

Drake
12 Sep, 2023, 17:24

put this into a script and run it:

TypeScript
#!/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"
Zeke(Jafesu)
9 Oct, 2023, 18:24

Every time i run this (even after regenning and reformatting my key) it gives me Invalid private key. when i run vars on the container, it is there and is right. i dont understand what I am doing wrong

Drake
9 Oct, 2023, 18:27

you're generating the key from github, right? can you DM me what's in your .env file?

Zeke(Jafesu)
9 Oct, 2023, 18:28

yes, and I will in 1 sec, testing a new key

Zeke(Jafesu)
9 Oct, 2023, 18:29

I think i figured it out

Zeke(Jafesu)
9 Oct, 2023, 18:29

It's working now. It was just a lot of me being dense

Zeke(Jafesu)
9 Oct, 2023, 18:30

I was adding the \n and double quotes, but not actually removing the line returns

Zeke(Jafesu)
9 Oct, 2023, 18:30

it works now. thank you

Zeke(Jafesu)
9 Oct, 2023, 18:31

[SOLVED] Unable to connect to github

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