htmlpreview / htmlpreview.github.com

HTML Preview for GitHub Repositories
htmlpreview.github.com
1.53k stars 307 forks source link

Cannot preview html with private repo #80

Open Awatatah opened 4 years ago

Awatatah commented 4 years ago

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

joelostblom commented 3 years ago

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
scruel commented 2 years ago

@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

seunggabi commented 2 years ago

add +?token=xxxx

스크린샷 2022-06-15 오전 12 33 53
fzyzcjy commented 2 years ago

Hi, is that token permanent or temporary? Can we get a permanent link?

ewjoachim commented 1 year ago

I could be wrong, but:

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.

ratkins commented 1 year ago

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!

taher27 commented 3 months ago

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?