With this solution you can clone private/public repositories from GitHub to your server. I use the same solution in Total.js Membership.
git terminal app
We have to create a bash script which clones the repository and removes unwanted files.
Create an operation file e.g.
You can execute the code below anywhere in your Total.js application: