Chef 12: Error while uploading cookbook
This question seems to have been answered in the Chef issue. To close the loop, I will summarise it here:

This was a bug introduced in Chef 12:


  The issue is with chef_solo vs chef_zero. It seems chef_solo was the old way of doing Chef things. So I added chef_zero.enabled true in the knife.rb file to activate chef_zero instead of chef_solo. When you do this, you should be able to upload.


It was subsequently fixed in Chef 13:


  This is fixed in Chef 13.3.3, which will be released in the ChefDK 2.2 release


At the time of writing, Chef is in major version 15, so this issue is very unlikely to be encountered in the wild.