# OPAL cannot clone private repo with non-default main branch (fixed in 0.1.16)
## The problem
OPAL server failed to clone a private policy repo when OPAL_POLICY_REPO_MAIN_BRANCH was set to a non-default branch (e.g. dev), with errors like did not find main branch. Cloning worked when the default branch was used, but a configured non-base branch broke the clone. The config used OPAL_POLICY_REPO_MAIN_BRANCH=dev with a private repo over SSH.
## The verified fix
Upgrade OPAL to 0.1.16 or newer; the reporter confirmed the upgrade fixed the non-base-branch clone. The maintainer could not reproduce it on 0.1.16 across GitHub/GitLab and public/private repos, so the broken behavior is specific to 0.1.12 and earlier. The reporter's setup used a private repo, which the maintainer's 0.1.16 verification also covered.
Source: https://github.com/permitio/opal/issues/150