Unit 9 · Ship it and keep it alive
Why a new repo can come out public
Defaults depend on how a repository is made. One generated from a public template can come out public. Check the visibility every time you create one, rather than assuming private.
The mix-up
What people often think
“New repos are private by default, so there is nothing to check.”
What the tutor says
Defaults change with how a repo is made. A repo generated from a public template can come out public. Check, every time.
Which repo was this one copied from, and what was its visibility?
How it works
If a repository was public by mistake, make it private; do not delete it, which loses history and breaks deploys without un-exposing anything. Then work out what it held, because anything cloned while it was public is out there.
Public code is a problem even without passwords: the source and business logic belong to the client. Tell them plainly what happened.
Close cousins of this mix-up
The tutor watches for these in the same lesson.
“Client repos are private automatically.”
Nothing is automatic. The template's visibility can carry over, so set it and check it.
“Making it private undoes the exposure.”
Private stops future visitors. Anything cloned while it was public is out there, so check what it held.
“Deleting the repo is the safest fix.”
Deleting loses history and breaks deploys, and it does not un-expose anything. Make it private instead.
“Public code is fine if it has no passwords.”
The client's code and business logic are theirs. Public by accident is a breach even without keys.
Practise it with a tutor watching
Public versus private
Find a repo that is public by mistake, fix it, judge what leaked, and add a check so it cannot happen quietly again.
Free, no account needed.