Publishing a private github repo

Hi there,

I’m trying to work out if I can publish a private github repo so that:

  • the client can see the working web app
  • the code can’t be accessed via View Source

I’m pretty sure I’d have to upgrade to pro to publish a private repo but I’m concerned if I do so the source code will still be visible (as it is using GitLab or Bitbucket).

If it’s not possible, any tips on the quickest alternative would be great. It’s a d3.js visualisation.

Hi @BMPMS, welcome to the GitHub Support Community! You can publish a private repository as a GitHub Pages site, yes! You’re right that it will require upgrading to a Pro subscription, but once you’ve done that you can enable Pages in the repository settings.

By this do you mean viewing the source on GitHub, or viewing the source in a browser? If it’s the former then your client won’t be able to see your code in side your GitHub repository unless you add their GitHub account as a collaborator.

If it’s the latter this isn’t going to be possible at all with a web app I’m afraid. Due to the way that browsers work they need to download a copy of your site’s code in order to run so your users will always be able to inspect the client-side code in their browser.

1 Like

Many thanks @thomasshaped

I thought as much. So essentially I need to either move to something more involved than a web app (React/Node/etc) or accept that the source will be visible.

Answer much appreciated.