2

I used github-free account and already know how to access my web asset on github repo-public via jsdelivr, then i want make it private. when i set the repo to private it not work, the assets cannot be accessed "failed to fetch"

My idea is :

  • Create private repo for web assets.
  • create branch that containing: branch/css, branch/js, branch/webfonts. As an example.
  • Serve it to jsdelivr cdn for my web.

Is anyone know how to implement github private repo to jsdelivr for web assets?

Alfan
  • 33
  • 4

1 Answers1

0

If you cannot serve directly a private GitHub repository, you might have to setup a plugin like private-github-website

Given a github repository and a set of allowed email addresses, serves up the content of the repo to everyone who logs in with an allowed email address.

See its repository: TehShrike/private-github-website/

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • So, that i have to do are: copy index+server.js to server, modified/fill some parameters in server.js to my values, and load to in html? Then how about to serve on jsdelivr cdn, is it same as regular just use "gh/user/repo"? thanks. – Alfan Sep 11 '21 at 06:32
  • @Alfan The idea is for that CDN to connect to your private repository, to fetch and serve those files. But I am a bit fuzzy on the setup of such a CDN. – VonC Sep 11 '21 at 06:34