Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CircleCI login is required if depending on an orb that is private #225

Open
jenny-miggin opened this issue Sep 14, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@jenny-miggin
Copy link

Orb version:

12.0.4

What happened:

When packing an orb that depends on another private orb in their namespace, the command fails as the user needs to log in via the CLI in order to find the specified org-id.

When using this job in a workflow:

- orb-tools/pack:
    filters: *filters
    org_slug: gh/my-org-slug

the job fails:

Error: failed to get the appropriate org-id: You must log in first.

Expected behavior:

The org-id can be found, enabling users to add an orb dependancy

Additional Information:

A workaround to this is to add a pre-step to the job, which uses the CLI to log in. This depends on the availability of an API key (CIRCLECI_API_TOKEN) within a context

- orb-tools/pack:
    filters: *filters
    org_slug: gh/my-org-slug
    pre-steps:
      - run:
          command: |
            circleci setup --no-prompt --token "${CIRCLECI_API_TOKEN}"
    context: my-context
@jenny-miggin jenny-miggin added the bug Something isn't working label Sep 14, 2023
@jenny-miggin jenny-miggin changed the title CircleCI login is required if referencing an orb within an orb that is private CircleCI login is required if depending on an orb that is private Sep 15, 2023
@Peter-Darton-i2
Copy link

FYI the usecase where I encountered this was when I wanted to make one of my (private-to-my-org) orb's jobs call upon a command that was in a different (private-to-my-org) orb.
i.e. I was writing orb myorg/foo and its src/@orb.yml file said orbs: bar: myorg/bar
... and that then caused the build to fail.
... even after I'd added the org_slug parameter.

e.g. this orb built by this build (whose eventual failure is unrelated to this issue; that's a story for another day...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants