Skip to content
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

fix conan user old references #13671

Merged
merged 1 commit into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions conans/client/rest/auth_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def call_rest_api_method(self, remote, method_name, *args, **kwargs):
# token is None when you change user with user command
# Anonymous is not enough, ask for a user
ConanOutput().info('Please log in to "%s" to perform this action. '
'Execute "conan user" command.' % remote.name)
'Execute "conan remote login" command.' % remote.name)
return self._retry_with_new_token(user, remote, method_name, *args, **kwargs)
elif token and refresh_token:
# If we have a refresh token try to refresh the access token
Expand Down Expand Up @@ -80,7 +80,7 @@ def _retry_with_new_token(self, user, remote, method_name, *args, **kwargs):
out.error('Wrong user or password')
else:
out.error('Wrong password for user "%s"' % user)
out.info('You can change username with "conan user <username>"')
out.info('You can change username with "conan remote login <remote> <username>"')
else:
return self.call_rest_api_method(remote, method_name, *args, **kwargs)

Expand Down
2 changes: 1 addition & 1 deletion conans/client/rest/rest_client_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def server_capabilities(self, user=None, password=None):
url = self.router.ping()
# logger.debug("REST: ping: %s" % url)
if user and password:
# This can happen in "conan user" cmd. Instead of empty token, use HttpBasic
# This can happen in "conan remote login" cmd. Instead of empty token, use HttpBasic
auth = HTTPBasicAuth(user, password)
else:
auth = self.auth
Expand Down