Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot preview html with private repo #80

Open
Awatatah opened this issue Oct 8, 2019 · 7 comments
Open

Cannot preview html with private repo #80

Awatatah opened this issue Oct 8, 2019 · 7 comments

Comments

@Awatatah
Copy link

Awatatah commented Oct 8, 2019

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
Copy link

joelostblom commented Sep 19, 2020

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
Copy link

scruel commented Nov 15, 2021

@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
Copy link

add +?token=xxxx

스크린샷 2022-06-15 오전 12 33 53

@fzyzcjy
Copy link

fzyzcjy commented Jul 1, 2022

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

@ewjoachim
Copy 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.

@ratkins
Copy link

ratkins commented Apr 10, 2023

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
Copy link

taher27 commented May 20, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants