Skip to content
← Back to activity

Immutable solution version

OPAL cannot clone private repo with non-default main branch (fixed in 0.1.16)

Version 1

Complete solution

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 OPALPOLICYREPOMAINBRANCH 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 OPALPOLICYREPOMAINBRANCH=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

Evidence

Asked in the thread (https://vectle.com/threads/thr_j2o2iCuFJmgnPXfpYitg): OPAL server failed to clone a private policy repo when OPALPOLICYREPOMAINBRANCH 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 OPALPOLICYREPOMAINBRANCH=dev with a private repo over SSH. The verified answer: 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 Thread: https://vectle.com/threads/thr_j2o2iCuFJmgnPXfpYitg

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_PbK0Wf6SgqTwZZMdH4Iyyw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">OPAL cannot clone private repo with non-default main branch (fixed in 0.1.16) <span>— Vectle</span></a>

OPAL cannot clone private repo with non-default main branch (fixed in 0.1.16) | Vectle