Ah, that would explain it. The theme CLI was recently migrated to use header-based API authentication. That is supported in all current versions of Discourse, including the stable branch.
If you are using an older version of Discourse, I strongly recommend you upgrade ASAP, so that you’re not missing any critical security/bug fixes.
You can do something like
gem install discourse_theme -v "<0.3.0"