Any solution to let client host on netlify while keeping the source code private?

Hi there,

I have a theme which i use to build a client website, now part of the deal does not include source code.

How can i let my client have an account on netlify to pay directly to netlify, while i let netlify use my repo to build the website without letting client access the source code?

Thanks

You can use Netlify CLI: Get started with Netlify CLI | Netlify Docs, but you’d need access to your client’s account. Not sure if your client is willing to share that with you.

If not, I don’t see a way here without any level of mutual understanding.

1 Like

Hi @hrishikesh

What you mean by account access? A simple some sort of access key to push builds or actual account on their account as a team member?

Is there a demo or blog available specific to this setup where 1 account push builds to clients account

Thanks

It’s your client’s call if they wish to pay additional money to keep you as a team member or to share their account’s password OR API token with you so they don’t have to pay extra. Either of those options would allow you to use Netlify CLI.

There’s no such demo or blog post, at least officially from Netlify.

Hi @hrishikesh

is there an illustration or demo of this to compare which one is easier for me and which one is more reliable. the clients are going to have to be premium users as they recieve more than 100 forms and their site will rebuild everyhour which will consume the 300 minutes for sure.

So there is no chance they will be free users, what i want is the most safest and easiest option for me and the most reliable for clients.

Are there any demos/ documentation showing all these options side by side?

Thanks

There’s no demo for this as this is not a use-case Netlify primarily targets or is degined for. Netlify is to build and host code the dev has access to.

If billing is not a problem, the safest way is to ask your client to add you as a team member and that would handle everything. If billing is a problem, as mentioned before, your client would have to share their account password OR create a personal access token for you to use.

1 Like

Thanks @hrishikesh

I see how can someone gererate personal access token : https://tota.dev/articles/how-to-create-an-access-token-on-netlify

But how can i use it to deploy is there any documentation which explains how the push worksis it something i need to add in github or netlify?

Thanks

Did you check Netlify CLI docs: Netlify CLI deploy command?

Hi @hrishikesh

I saw this but it doesnt made any sense to me the only reason to use netlify for me is so i can avoide doing complex technical stuff and use the UI.

So it is not that i didn’t check the documents before requesting here. the docs are too complex for me and more confusing. I just want to keep the repos private and let each client have their own account for payment and hosting and simply push to their sites.

If you have a simple solution for me as a beginner in netlify i will really appreciate

thanks

I have provided you with 2 available options:

  1. If your client would like to add you to their team: You can use the Netlify UI and deploy the site like you’d normally deploy. This would incurr additional costs for your client.
  2. If your client would not like to add you to their team: You’d have to use Netlify CLI and deploy it via the CLI using the Personal Access Token. It’s not complicated as such assuming you know the basics of how to use Node.js + how to use terminal. If you don’t know this, you might have to go with option 1, but considering you’ve tagged this post as Hugo, I think you might know little bit about the terminal as Hugo works only in terminal. If you do, once you’ve setup Netlify CLI as per the documentation initially provided, you now simply need to run netlify deploy --build --prod in your terminal and your site would be built and deployed.