I want to use GitHub as a paclet server, but this fails:

 "Site" -> "https:/github.com/paclets/Repository"

PacletSiteUpdate::err: An error occurred attempting to update paclet information from site https:/github.com/b3m2a1/PacletServer. Does not appear to be a valid paclet site

PacletInstall::notavail: No paclet named ServiceConnection_StackExchange is available for download from any currently enabled paclet sites.


Is there a work around?

See also: How to distribute Mathematica packages as paclets? and this answer


First things first we set up the paclet server in the normal way as described here or here.

Then all we need to do is pass the "raw.githubusercontent" version of that so that the resources themselves get downloaded instead of the HTML pages:

 "Site" -> 

"Name" -> "ServiceConnection_StackExchange", "Version" -> "1.0.0", 
 "Description" -> "A service connection to the Stack Exchange API. \
Supports the majority of the functions defined in the API", 
 "Extensions" -> {{
   "Kernel", "Root" -> ".", 
    "Context" -> "ServiceConnection_StackExchange`"}, {
   "FrontEnd", "Prepend" -> True}}, 
 "Location" -> "~/Library/Mathematica/Paclets/Repository/\


As Szabolcs points out, you must use "http://raw.githubusercontent.com". The PacletManger refuses to use the "https://" form.

| improve this answer | |
  • 2
    $\begingroup$ Do point out the HTTPS thing for those who wouldn't realize its importance. $\endgroup$ – Szabolcs Sep 5 '17 at 20:37
  • $\begingroup$ a) GitHubServer should be PacletServer right? b) I think this topic deserves a one line intro about the setup because users could be confused about that is really going on. $\endgroup$ – Kuba Jan 7 '19 at 10:20
  • $\begingroup$ @Kuba the GitHubServer was a repo I set up specifically for this question and at some point must have removed. I'll change it to the public server. That's a better one to point to. $\endgroup$ – b3m2a1 Jan 7 '19 at 16:09
  • 1
    $\begingroup$ I've created a PacletSite.mz at my github repo, but I cannot PacletSiteUpdate the registered github URL: PacletSiteUpdate::err: An error occurred attempting to update paclet information from site http://raw.githubusercontent.com/IstvanZachar/[...]. Does not appear to be a valid paclet site. What exactly is considered a valid paclet site? Could you clarify what have changed in the last 2+ years (especially with paclet management published in v12.1)? I'm not sure I've correctly set up my github folder: where exactly should I put the mz file? $\endgroup$ – István Zachar Mar 27 at 21:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.