diff options
author | Matt Davis <nitzmahone@users.noreply.github.com> | 2020-10-23 09:11:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-23 09:11:45 -0700 |
commit | 83909bfa22573777e3db5688773bda59721962ad (patch) | |
tree | 76576487e0dbcb8eeba74a293cee1fa8fdf2a9b4 /lib/ansible/galaxy/api.py | |
parent | b6360dc5e068288dcdf9513dba732f1d823d1dfe (diff) | |
download | ansible-83909bfa22573777e3db5688773bda59721962ad.tar.gz |
Remove ansible-galaxy login (#72288)
* GitHub is removing the underlying API used to implement the `login` command. Since the general consensus seems to be that relatively nobody currently uses this command (in favor of explicit token passing), support was simply removed for interactive login. If a future need arises, this command should be reimplemented via OAuth Device Auth Grants.
* login or role login commands now produce a fatal error with a descriptive message
* updated 2.10 and 2.11 porting guide entries
* remove dead code/config, update messages and porting guides
Diffstat (limited to 'lib/ansible/galaxy/api.py')
-rw-r--r-- | lib/ansible/galaxy/api.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ansible/galaxy/api.py b/lib/ansible/galaxy/api.py index 3335c5f0f6..7f6ed9e50f 100644 --- a/lib/ansible/galaxy/api.py +++ b/lib/ansible/galaxy/api.py @@ -12,6 +12,7 @@ import tarfile import uuid import time +from ansible import constants as C from ansible.errors import AnsibleError from ansible.galaxy.user_agent import user_agent from ansible.module_utils.six import string_types @@ -215,8 +216,8 @@ class GalaxyAPI: return if not self.token and required: - raise AnsibleError("No access token or username set. A token can be set with --api-key, with " - "'ansible-galaxy login', or set in ansible.cfg.") + raise AnsibleError("No access token or username set. A token can be set with --api-key " + "or at {0}.".format(to_native(C.GALAXY_TOKEN_PATH))) if self.token: headers.update(self.token.headers()) |