Can I make enviroment variables private on public repo?

I found the enviroment variables added in settings are marked as Public, I want to know how to make it private?

I want add some api key and access token.


Environment variable policies can be seen in action here.

I hope this is what you were looking for. Please get in touch if you need further help :smile:

Hi @theowenyoung. Sorry for the confusion. The Public badges you encountered in the UI were part of a feature that is still in development. They don’t reflect actual data, and were not intended for customers in the current state.

As mentioned in the sensitive variable policy doc that @Pie linked, Netlify currently detects which variables could potentially be sensitive. The methods we use for this detection are not public, but you can see which ones we have identified if you select “Deploy without sensitive variables,” and trigger an untrusted deploy. The deploy log will identify the variables excluded from the build environment.

Ok, got it, thank you~