Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Link to file in a private repositories using rawGit #44

Closed
SPJS opened this issue Oct 23, 2014 · 4 comments
Closed

Link to file in a private repositories using rawGit #44

SPJS opened this issue Oct 23, 2014 · 4 comments
Labels

Comments

@SPJS
Copy link

SPJS commented Oct 23, 2014

Hi,
Is it possible to link to a file from a private repository trough rawGit? I tested it and included the .../filename.js?token=XXX in the link, but it does not seem to work.

Alexander

@rgrove
Copy link
Owner

rgrove commented Oct 23, 2014

No, it's not currently possible to link to files in private repos. I'm curious what your use case is though.

@SPJS
Copy link
Author

SPJS commented Oct 23, 2014

Thank you for the feedback. I wanted to use it to test code developed in a
private repository, and when it is ready for publishing I planned to
transfer it to a proper CDN. I'm new to GitHub and this may not be the
proper way to do it...
Alexander
23. okt. 2014 18:17 skrev "Ryan Grove" notifications@github.com følgende:

No, it's not currently possible to link to files in private repos. I'm
curious what your use case is though.


Reply to this email directly or view it on GitHub
#44 (comment).

@rgrove
Copy link
Owner

rgrove commented Oct 23, 2014

Thanks for the info, @SPJS. I don't think your use case is improper; just wanted to understand how you planned to use it.

There are two reasons RawGit doesn't currently support requesting files from private repos:

  1. I'm worried people will request private files via the CDN, which will cache them permanently, and then have second thoughts about making those files permanently public.
  2. RawGit currently ignores the query string when caching a URL in order to prevent people from abusing the system by appending cachebuster params that change on every request (plenty of people do this). Supporting private file tokens in query strings would require including query strings in the cache key, which would enable cachebuster abuse.

One workaround for you would be to paste the private file(s) you want to test into a private gist, which RawGit does support (because there are no query strings involved).

@agilliam-cmg
Copy link

@SPJS:

I tested it and included the .../filename.js?token=XXX

How do I find/generate this token in the query string pragmatically?

Repository owner locked as resolved and limited conversation to collaborators Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants