# Possible to publish private orb with orb-tools?

**URL:** <https://discuss.circleci.com/t/possible-to-publish-private-orb-with-orb-tools/45125>\
**Category:** Orbs\
**Created:** [August 18, 2022, 2:54pm UTC](https://discuss.circleci.com/t/possible-to-publish-private-orb-with-orb-tools/45125 "2022-08-18T14:54:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mt43omwn](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@mt43omwn](https://discuss.circleci.com/u/mt43omwn)\
**Post date:** [August 18, 2022, 2:54pm UTC](https://discuss.circleci.com/t/possible-to-publish-private-orb-with-orb-tools/45125/1 "2022-08-18T14:54:16Z")

</div>

The title pretty much says it all. I need to publish an orb as private to an organization, but reading through the orb-tools documentation, I don’t see an option to specify public vs. private in the publish job.

Am I missing something, or is it really only possible to publish a private orb via the CLI?

---

<div class="post-metadata">

**Author:** ![KyleTryon](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/kyletryon/32/9977_2.png) [@KyleTryon](https://discuss.circleci.com/u/KyleTryon)\
**Post date:** [August 19, 2022, 2:40pm UTC](https://discuss.circleci.com/t/possible-to-publish-private-orb-with-orb-tools/45125/2 "2022-08-19T14:40:10Z")

</div>

You can! There is no difference in the process. The orb just needs to be created using the `--private` flag.

Just to be 100% sure, I went to the source to check: [circleci-cli/orb.go at ec7d8d3bff677e0bdce7830fdefaee6dcab64da7 · CircleCI-Public/circleci-cli · GitHub](https://github.com/CircleCI-Public/circleci-cli/blob/ec7d8d3bff677e0bdce7830fdefaee6dcab64da7/cmd/orb.go#L321)

---

<div class="post-metadata">

**Author:** ![mt43omwn](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@mt43omwn](https://discuss.circleci.com/u/mt43omwn)\
**Post date:** [August 19, 2022, 5:00pm UTC](https://discuss.circleci.com/t/possible-to-publish-private-orb-with-orb-tools/45125/3 "2022-08-19T17:00:21Z")

</div>

Thanks for taking a look, @KyleTryon!

I’m not sure if you misunderstood my question, or if I’m still just confused. I’m aware of the ability to publish a private orb using the CLI with the `--private` flag as shown in the link you posted. What I’m trying to figure out is how to accomplish that when using the orb-tool orb’s `publish` command. It looks like that orb just calls the CLI publish command but doesn’t provide a parameter to specify to pass in the `--private` flag: [orb-tools-orb/publish.sh at master · CircleCI-Public/orb-tools-orb · GitHub](https://github.com/CircleCI-Public/orb-tools-orb/blob/master/src/scripts/publish.sh#L24)

Does that make sense?

---

<div class="post-metadata">

**Author:** ![KyleTryon](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/kyletryon/32/9977_2.png) [@KyleTryon](https://discuss.circleci.com/u/KyleTryon)\
**Post date:** [August 19, 2022, 5:30pm UTC](https://discuss.circleci.com/t/possible-to-publish-private-orb-with-orb-tools/45125/4 "2022-08-19T17:30:02Z")

</div>

Totally makes sense.

The publish command does not need this flag. The orb itself is private, any and all versions from here on out will always be private (and you can not un-private). So the orb-tools orb process is actually 100% the same for private and non-private orbs. The only difference is making sure that when you create the orb originally, it has the private flag.

`private` is not a flag available on the `orb publish` command.

 ![image](https://global.discourse-cdn.com/circleci/original/3X/3/3/331a6d78781447e8ba95fb31821db4e19ae1a779.png)

---

<div class="post-metadata">

**Author:** ![mt43omwn](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@mt43omwn](https://discuss.circleci.com/u/mt43omwn)\
**Post date:** [August 19, 2022, 9:40pm UTC](https://discuss.circleci.com/t/possible-to-publish-private-orb-with-orb-tools/45125/5 "2022-08-19T21:40:08Z")

</div>

Ah, I see. I totally overlooked that the `--private` flag is passed to the init command, not the publish command 🤦‍♂️.

And orb-tools appears not to include the init functionality, which makes sense since it’s something that would just be run once via the CLI.

Thanks for clarifying!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [August 29, 2022, 9:40pm UTC](https://discuss.circleci.com/t/possible-to-publish-private-orb-with-orb-tools/45125/6 "2022-08-29T21:40:55Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
