Cannot preview html with private repo
Awatatah opened this issue · comments
Do I need to include a token or something?
( I replaced private info with xxx
)
when I go to link http://htmlpreview.github.io/?https://github.com/xxx/xxx/blob/master/xxx/src/index.html
I get
Error: Cannot load https://raw.githubusercontent.com/xxx/xxx/master/xxx/src/index.html: 404 Not Found
Previewing private repos works form me. Your raw link should include a token by default after clicking "Raw" on GitHub. The format looks like this:
https://raw.githubusercontent.com/xxx/xxx/master/xxx/src/index.html?token=DFSJKDFKLFJVJIOIOJSDKLF989JIOPJ8990
@joelostblom In which format? Still not work for me now.
https://htmlpreview.github.io/?https://raw.githubusercontent.com/scruel/PageArchive/master/test.html?token=DFSJKDFKLFJVJIOIOJSDKLF989JIOPJ8990
Hi, is that token permanent or temporary? Can we get a permanent link?
I could be wrong, but:
- the token is supposedly temporary (which is a good thing for protecting private pages)
- If there was a way for htmlpreview to access private repo without the user manually transmitting the token, it would be a huge security issue. That would mean any third party website would be able to read your github private information without any sort of logging in or anything. The fact that we can't have it without the user manually submitting some sort of creds is reassuring.
That said, we could have a system à-la https://useful-forks.github.io/ where we could add a Personal Access Token that could be kept in the local storage and used to access private repos.
I’m getting a 404 with this URL:
https://htmlpreview.github.io/?https://raw.githubusercontent.com/ratkins/xxx/main/src/index.html?token=zzz
I compared this to @scruel ’s comment and I think I’m doing it right? It might be important to note I’m on an iPad running 16.4 (where this functionality would be very handy if I could get it to work!)
UPDATE: I’ve just tried it again and it works! Not sure what I’m doing differently this time. But thanks, this is amazing!
I tried htmlpreview.github.io with a private repo and token, and it worked, but internal routing in my HTML is gone for a toss.
Has anyone faced the same or know how to fix it?