Before the first push to a newly created repository, rename the local default branch from "master" to an arbitrary name i.e "test".
When you push to remote, check the UI, this error is received "The default branch is set to "refs/heads/master" but does not exist. Configure the default branch in the repository settings."
After changing the default branch to "test", when you try to clone from the mirror, you get the error "warning: remote HEAD refers to nonexistent ref, unable to checkout.", but cloning from the upstream server works fine.
Try to clone from the mirror
Navigate to the repository in the mirror file system, and manually updated the default branch from the "HEAD" file: from ref: refs/heads/master to ref: refs/heads/test