hazel icon indicating copy to clipboard operation
hazel copied to clipboard

404 Error from Github private repo

Open dlamon1 opened this issue 3 years ago • 8 comments

I get a 404 error from Github when using a private repo. Am I missing something? The install form asked for my username and repository, it did not ask for a key or token. I have awarded my Vercel account permission to access the Github repo, this did not change the 404 error.

Looking through the Hazel repository, I cannot find where my specific username and repository are declared. Are these variables stored in Vercel? Also, are these variables something I could hardcode in the /lib/server.js file?

dlamon1 avatar Aug 13 '21 04:08 dlamon1

Always, and I cannot stress this enough, read the documentation! Set the env variable TOKEN for private repos. As states in the Readme

dlamon1 avatar Aug 13 '21 18:08 dlamon1

@dlamon1 I can't figure out how to set a TOKEN for my private repo. Where should I add this in my files? or is this run via a CLI command?

Any examples would be great!

tarikhaiga avatar Sep 24 '21 06:09 tarikhaiga

@tarikhaiga

This is added inside of Vercel once you've deployed Hazel (https://vercel.com/ACCOUNT_NAME/PROJECT_NAME/settings/environment-variables)

Screen Shot 2021-09-24 at 11 10 20 AM l

ryandunnewold avatar Sep 24 '21 16:09 ryandunnewold

Thanks @ryandunnewold ! I added both TOKEN and GH_TOKEN in the Environment Variables section on Vercel but it still does not trigger an update when one is available.

How did you manage to make auto-updating work for private repos?

tarikhaiga avatar Sep 28 '21 07:09 tarikhaiga

@tarikhaiga here was the issue I ran into (included my fix in there) https://github.com/vercel/hazel/issues/131

ryandunnewold avatar Sep 28 '21 13:09 ryandunnewold

I had to redeploy the app to make it read TOKEN variable

Deliaz avatar Oct 01 '21 16:10 Deliaz

Thanks @Deliaz, redeploying worked for me 👍🏻

dsegovia90 avatar Dec 14 '21 19:12 dsegovia90

What's the leanest scope the token can have?

rzfzr avatar Jun 07 '22 20:06 rzfzr