Remove deprecated auth token option - #406
Closed
cloudsmith-iduffy wants to merge 3 commits into
Closed
Conversation
This reverts commit 0acbc1f.
cloudsmith-iduffy
marked this pull request as ready for review
September 3, 2026 08:40
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the deprecated cloudsmith auth --token/-t flow from the CLI authentication command, simplifying the SSO/auth surface area and steering users to the newer --request-api-key behavior.
Changes:
- Removed the deprecated
--token/-tClick option, warning text, and legacy token-creation invocation path fromcloudsmith auth/authenticate. - Updated CLI tests to expect
--tokento be rejected as an unknown option. - Added an Unreleased changelog note directing users to
--request-api-key.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cloudsmith_cli/cli/commands/auth.py | Drops the deprecated --token option and related logic from the auth command while keeping --request-api-key flow intact. |
| cloudsmith_cli/cli/tests/commands/test_auth.py | Adjusts tests to reflect that --token no longer exists as an option. |
| CHANGELOG.md | Documents the removal of cloudsmith auth --token in the Unreleased notes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+326
to
+331
| def test_token_option_is_rejected(self, runner): | ||
| """Verify the removed --token option is rejected.""" | ||
| result = runner.invoke(authenticate, ["--token"]) | ||
|
|
||
| assert result.exit_code != 0 | ||
| assert ( | ||
| "--request-api-key cannot be used with --token or --force" in result.output | ||
| ) | ||
| assert "No such option '--token'" in result.output |
Comment on lines
14
to
18
| ### Changed | ||
|
|
||
| - `cloudsmith domains list` now includes the Workspace slug in a `workspace` field. | ||
| - Removed `cloudsmith auth --token`; use `--request-api-key` instead. | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--token/-toption fromcloudsmith authandauthenticate--request-api-keyin the Unreleased changelog while preserving existing--jsonand--forcebehaviorTesting
env -u CLOUDSMITH_WORKSPACE -u CLOUDSMITH_ORG pytest -q cloudsmith_cli/cli/tests/commands/test_auth.pypre-commit run --files CHANGELOG.md cloudsmith_cli/cli/commands/auth.py cloudsmith_cli/cli/tests/commands/test_auth.pyStack layer 1; targets
master.