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

forbidden error from knife supermarket unshare is now misleading #8056

robbkidd opened this Issue Dec 14, 2018 · 5 comments


None yet
4 participants
Copy link

robbkidd commented Dec 14, 2018


knife supermarket unshare currently treats all 403 Forbidden responses the same and presents a single error: Forbidden: You must be the maintainer of #{@cookbook_name} to unshare it.

With artifact yanking now able to be restricted in a Supermarket to admins only, this error message is misleading to cookbook owners who attempt to remove a cookbook or cookbook version. The Supermarket v3.1.96+ will provide an error message with the forbidden response that will be more helpful to display.

Chef Version

All of 'em

Platform Version

All of these, too.

Replication Case & Client Output

With a Supermarket configured to prevent owners from removing artifacts (the public Supermarket is now configured this way, or use a test Supermarket install):

> knife supermarket share blargle -m https://superkitchen -o .
Generating metadata for blargle from /var/folders/blah/blah/blargle/metadata.rb
Making tarball blargle.tgz
Upload complete

🎉 I'm the maintainer of a shiny,new cookbook!

> knife supermarket unshare blargle -m https://superkitchen
Do you really want to unshare all versions of the cookbook blargle? (Y/N) y
ERROR: Forbidden: You must be the maintainer of blargle to unshare it.

😕 Wait ... I am the maintainer!


This comment has been minimized.

Copy link

lamont-granquist commented Dec 14, 2018

yep, that's now wrong.


This comment has been minimized.

Copy link

vagifzeynalov commented Jan 9, 2019

I have the same problem! Any solutions?


This comment has been minimized.

Copy link

robbkidd commented Jan 10, 2019

@vagifzeynalov Can you explain more about your particular problem? The error condition as described in this issue is a Supermarket instance configured to disallow artifact removal results in an error about needing to be a maintainer instead of an error about artifact removal being disallowed. The fix for this issue is to correct the error message; users—even cookbook owners—will not be able to remove the artifact.


This comment has been minimized.

Copy link

tas50 commented Jan 18, 2019

@robbkidd if you want to come up with some text that captures both the public supermarket and the private supermarket scenario I'll get the error message updated.


This comment has been minimized.

Copy link

vagifzeynalov commented Jan 18, 2019

@robbkidd it seems like I didn't read the original description of this issue carefully. I was thinking this conversation about the problem I couldn't remove my cookbook from Supermarket. But as it turned out, it was expected behavior, and only the message itself was incorrect...
Sorry, I confused you with my comment :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment