{"action":"created","issue":{"url":"https://api.github.com/repos/chef/chef/issues/5088","repository_url":"https://api.github.com/repos/chef/chef","labels_url":"https://api.github.com/repos/chef/chef/issues/5088/labels{/name}","comments_url":"https://api.github.com/repos/chef/chef/issues/5088/comments","events_url":"https://api.github.com/repos/chef/chef/issues/5088/events","html_url":"https://github.com/chef/chef/issues/5088","id":164178638,"number":5088,"title":"knife-cookbook-site-share and knife-supermarket producing 404 errors","user":{"login":"loganmeetsworld","id":10510566,"avatar_url":"https://avatars.githubusercontent.com/u/10510566?v=3","gravatar_id":"","url":"https://api.github.com/users/loganmeetsworld","html_url":"https://github.com/loganmeetsworld","followers_url":"https://api.github.com/users/loganmeetsworld/followers","following_url":"https://api.github.com/users/loganmeetsworld/following{/other_user}","gists_url":"https://api.github.com/users/loganmeetsworld/gists{/gist_id}","starred_url":"https://api.github.com/users/loganmeetsworld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loganmeetsworld/subscriptions","organizations_url":"https://api.github.com/users/loganmeetsworld/orgs","repos_url":"https://api.github.com/users/loganmeetsworld/repos","events_url":"https://api.github.com/users/loganmeetsworld/events{/privacy}","received_events_url":"https://api.github.com/users/loganmeetsworld/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-07-06T21:28:33Z","updated_at":"2016-07-11T15:47:31Z","closed_at":null,"body":"## Description\r\n\r\nWhen I use the command `knife cookbook site share -o <location> <cookbook-name> -k <key-location> -VV` or the same command with `knife supermarket share`, I get the error: \r\n`FATAL: Unable to reach Supermarket: 404 \"Not Found\". Increase log verbosity (-VV) for more information.`\r\n\r\n## Chef Version\r\n\r\nchef -v: \r\n`Chef Development Kit Version: 0.15.16\r\nchef-client version: 12.12.14\r\ndelivery version: master (444effdf9c81908795e88157f01cd667a6c43b5f)\r\nberks version: 4.3.5\r\nkitchen version: 1.10.0`\r\n\r\n## Platform Version\r\n\r\nMac 10.11.5\r\n\r\n## Replication Case\r\n\r\n1. Uninstall knife supermarket: `gem uninstall knife-supermarket`\r\n2. Install appbundle-updater: `chef gem install appbundle-updater`\r\n3. Install chef v12.12.13: `sudo chef exec appbundle-updater chefdk chef v12.12.13`\r\n4. Run  `knife cookbook site share -o <location> <cookbook-name> -k <key-location> -VV`\r\n5. In terraformed supermarket knife.rb, point supermarket-site to the public ip of the terraform supermarket. \r\n\r\n## Stacktrace\r\n\r\nShort: \r\n`FATAL: Unable to reach Supermarket: 404 \"Not Found\". Increase log verbosity (-VV) for more information.`\r\n\r\nAll output: \r\n`DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_request\r\nDEBUG: Chef::HTTP calling Chef::HTTP::JSONOutput#handle_request\r\nDEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_request\r\nDEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_request\r\nDEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_request\r\nDEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_request\r\nDEBUG: Initiating GET to https://supermarket.chef.io/api/v1/cookbooks/dino\r\nDEBUG: ---- HTTP Request Header Data: ----\r\nDEBUG: Accept: application/json\r\nDEBUG: Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nDEBUG: X-REMOTE-REQUEST-ID: 8f85fe7f-e416-4093-b160-a52f8476834b\r\nDEBUG: ---- End HTTP Request Header Data ----\r\nDEBUG: ---- HTTP Status and Header Data: ----\r\nDEBUG: HTTP 1.1 404 Not Found\r\nDEBUG: cache-control: no-cache\r\nDEBUG: content-encoding: gzip\r\nDEBUG: content-type: application/json; charset=utf-8\r\nDEBUG: date: Wed, 06 Jul 2016 20:26:14 GMT\r\nDEBUG: server: nginx/1.8.1\r\nDEBUG: status: 404 Not Found\r\nDEBUG: x-content-type-options: nosniff\r\nDEBUG: x-frame-options: SAMEORIGIN\r\nDEBUG: x-request-id: 6669e6f7-0eec-4de1-a101-3aa94fe3ded9\r\nDEBUG: x-runtime: 0.007463\r\nDEBUG: x-xss-protection: 1; mode=block\r\nDEBUG: content-length: 87\r\nDEBUG: connection: Close\r\nDEBUG: ---- End HTTP Status/Header Data ----\r\nDEBUG: ---- HTTP Response Body ----\r\nDEBUG: �VJ-*�/��M-.NLO-V��V\r\nJ-�/-JNUH�O-V��/QH��,.�S�Ձ�N�OIU�R���w��sQ��?H\r\nDEBUG: ---- End HTTP Response Body -----\r\nDEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_response\r\nDEBUG: Content-Length validated correctly.\r\nDEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_response\r\nDEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_response\r\nDEBUG: Decompressing gzip response\r\nDEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_response\r\nDEBUG: Chef::HTTP calling Chef::HTTP::JSONOutput#handle_response\r\nDEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_response\r\nINFO: HTTP Request Returned 404 Not Found:\r\nFATAL: Unable to reach Supermarket: 404 \"Not Found\". Increase log verbosity (-VV) for more information.\r\nDEBUG:\r\n/opt/chefdk/embedded/lib/ruby/2.1.0/net/http/response.rb:119:in `error!'\r\n/Users/loganmcdonald/.chefdk/gem/ruby/2.1.0/gems/chef-12.12.14/lib/chef/http.rb:146:in `request'\r\n/Users/loganmcdonald/.chefdk/gem/ruby/2.1.0/gems/chef-12.12.14/lib/chef/http.rb:111:in `get'\r\n/Users/loganmcdonald/.chefdk/gem/ruby/2.1.0/gems/chef-12.12.14/lib/chef/knife/cookbook_site_share.rb:117:in `get_category'\r\n/Users/loganmcdonald/.chefdk/gem/ruby/2.1.0/gems/chef-12.12.14/lib/chef/knife/cookbook_site_share.rb:69:in `run'\r\n/Users/loganmcdonald/.chefdk/gem/ruby/2.1.0/gems/chef-12.12.14/lib/chef/knife.rb:421:in `block in run_with_pretty_exceptions'\r\n/Users/loganmcdonald/.chefdk/gem/ruby/2.1.0/gems/chef-12.12.14/lib/chef/local_mode.rb:44:in `with_server_connectivity'\r\n/Users/loganmcdonald/.chefdk/gem/ruby/2.1.0/gems/chef-12.12.14/lib/chef/knife.rb:420:in `run_with_pretty_exceptions'\r\n/Users/loganmcdonald/.chefdk/gem/ruby/2.1.0/gems/chef-12.12.14/lib/chef/knife.rb:219:in `run'\r\n/Users/loganmcdonald/.chefdk/gem/ruby/2.1.0/gems/chef-12.12.14/lib/chef/application/knife.rb:148:in `run'\r\n/Users/loganmcdonald/.chefdk/gem/ruby/2.1.0/gems/chef-12.12.14/bin/knife:25:in `<top (required)>'\r\n/opt/chefdk/bin/knife:52:in `load'\r\n/opt/chefdk/bin/knife:52:in `<main>'`"},"comment":{"url":"https://api.github.com/repos/chef/chef/issues/comments/231775815","html_url":"https://github.com/chef/chef/issues/5088#issuecomment-231775815","issue_url":"https://api.github.com/repos/chef/chef/issues/5088","id":231775815,"user":{"login":"aershov1978","id":9679354,"avatar_url":"https://avatars.githubusercontent.com/u/9679354?v=3","gravatar_id":"","url":"https://api.github.com/users/aershov1978","html_url":"https://github.com/aershov1978","followers_url":"https://api.github.com/users/aershov1978/followers","following_url":"https://api.github.com/users/aershov1978/following{/other_user}","gists_url":"https://api.github.com/users/aershov1978/gists{/gist_id}","starred_url":"https://api.github.com/users/aershov1978/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aershov1978/subscriptions","organizations_url":"https://api.github.com/users/aershov1978/orgs","repos_url":"https://api.github.com/users/aershov1978/repos","events_url":"https://api.github.com/users/aershov1978/events{/privacy}","received_events_url":"https://api.github.com/users/aershov1978/received_events","type":"User","site_admin":false},"created_at":"2016-07-11T15:47:31Z","updated_at":"2016-07-11T15:47:31Z","body":"Supermarket URL is hardcoded in chef-12.12.15/lib/chef/knife/cookbook_site_share.rb:\r\n`def get_category(cookbook_name)\r\n        begin\r\n          data = noauth_rest.get(\"https://supermarket.chef.io/api/v1/cookbooks/#{@name_args[0]}\")\r\n          if !data[\"category\"] && data[\"error_code\"]\r\n            ui.fatal(\"Received an error from Supermarket: #{data[\"error_code\"]}. On the first time you upload it, you are required to specify the category you want to share this cookbook to.\")\r\n            exit(1)\r\n          else`"}}
{"actor":{"display_login":"aershov1978"}}