I believe you’ll need to setup a Repository View permission and assign it to any roles that you want to be able to access the repository. Once you do that public access should no longer be allowed. You can find the security documentation here for more details.