
##### SUMMARY
If you have an ansible.cfg with valid token/entries for both Automation Hub and Galaxy, and:
server_list = automation_hub, release_galaxy

This completely breaks an upstream Galaxy collection install and gives you no clue about the problem.

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
ansible-galaxy

##### ANSIBLE VERSION

```
ansible --version
ansible 2.9.11
  config file = /Users/pgriffit/ansible.cfg
  configured module search path = ['/Users/pgriffit/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.8.5 (default, Jul 21 2020, 10:48:26) [Clang 11.0.3 (clang-1103.0.32.62)]
```

##### CONFIGURATION

```
grep server_list ansible.cfg
server_list = automation_hub, release_galaxy
```

##### OS / ENVIRONMENT
sw_vers:
ProductName:	Mac OS X
ProductVersion:	10.15.5
BuildVersion:	19F101


##### STEPS TO REPRODUCE

setup ansible.cfg with server_list as above and valid [galaxy_server.automation_hub] and [galaxy_server.release_galaxy] urls/tokens

##### EXPECTED RESULTS

With server_list = release_galaxy, automation_hub, works as expected:

```
ansible-galaxy collection install servicenow.servicenow
Process install dependency map
Starting collection install process
Installing 'servicenow.servicenow:1.0.2' to '/Users/pgriffit/collections/ansible_collections/servicenow/servicenow'
```

##### ACTUAL RESULTS

```
ansible-galaxy collection install servicenow.servicenow -vvv
ansible-galaxy 2.9.11
  config file = /Users/pgriffit/ansible.cfg
  configured module search path = ['/Users/pgriffit/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
  executable location = /usr/local/bin/ansible-galaxy
  python version = 3.8.5 (default, Jul 21 2020, 10:48:26) [Clang 11.0.3 (clang-1103.0.32.62)]
Using /Users/pgriffit/ansible.cfg as config file
Found installed collection f5networks.f5_modules:1.1.0 at '/Users/pgriffit/collections/ansible_collections/f5networks/f5_modules'
Found installed collection ansible.posix:1.1.0 at '/Users/pgriffit/collections/ansible_collections/ansible/posix'
Found installed collection ansible.netcommon:0.0.2 at '/Users/pgriffit/collections/ansible_collections/ansible/netcommon'
Found installed collection junipernetworks.junos:0.0.2 at '/Users/pgriffit/collections/ansible_collections/junipernetworks/junos'
Found installed collection servicenow.servicenow:1.0.1 at '/Users/pgriffit/collections/ansible_collections/servicenow/servicenow'
Process install dependency map
Processing requirement collection 'servicenow.servicenow'
ERROR! Unexpected Exception, this is probably a bug: HTTP Error 400: Bad Request
the full traceback was:

Traceback (most recent call last):
  File "/usr/local/bin/ansible-galaxy", line 123, in <module>
    exit_code = cli.run()
  File "/usr/local/lib/python3.8/site-packages/ansible/cli/galaxy.py", line 376, in run
    context.CLIARGS['func']()
  File "/usr/local/lib/python3.8/site-packages/ansible/cli/galaxy.py", line 851, in execute_install
    install_collections(requirements, output_path, self.api_servers, (not ignore_certs), ignore_errors,
  File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/collection.py", line 457, in install_collections
    dependency_map = _build_dependency_map(collections, existing_collections, b_temp_path, apis,
  File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/collection.py", line 821, in _build_dependency_map
    _get_collection_info(dependency_map, existing_collections, name, version, source, b_temp_path, apis,
  File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/collection.py", line 894, in _get_collection_info
    collection_info = CollectionRequirement.from_name(collection, apis, requirement, force, parent=parent)
  File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/collection.py", line 346, in from_name
    resp = api.get_collection_versions(namespace, name)
  File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/api.py", line 56, in wrapped
    data = self._call_galaxy(n_url, method='GET', error_context_msg=error_context_msg)
  File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/api.py", line 192, in _call_galaxy
    self._add_auth_token(headers, url, required=auth_required)
  File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/api.py", line 222, in _add_auth_token
    headers.update(self.token.headers())
  File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/token.py", line 94, in headers
    headers['Authorization'] = '%s %s' % (self.token_type, self.get())
  File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/token.py", line 77, in get
    resp = open_url(to_native(self.auth_url),
  File "/usr/local/lib/python3.8/site-packages/ansible/module_utils/urls.py", line 1384, in open_url
    return Request().open(method, url, data=data, headers=headers, use_proxy=use_proxy,
  File "/usr/local/lib/python3.8/site-packages/ansible/module_utils/urls.py", line 1294, in open
    r = urllib_request.urlopen(*urlopen_args)
  File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request

```

try:
            with tarfile.open(self.b_path, mode='r') as collection_tar:
                files_member_obj = collection_tar.getmember('FILES.json')
                with _tarfile_extract(collection_tar, files_member_obj) as (dummy, files_obj):
                    files = json.loads(to_text(files_obj.read(), errors='surrogate_or_strict'))
                _extract_tar_file(collection_tar, 'MANIFEST.json', b_collection_path, b_temp_path)
                _extract_tar_file(collection_tar, 'FILES.json', b_collection_path, b_temp_path)
                for file_info in files['files']:
                    file_name = file_info['name']
                    if file_name == '.':
                        continue
                    if file_info['ftype'] == 'file':
                        _extract_tar_file(collection_tar, file_name, b_collection_path, b_temp_path,
                                          expected_hash=file_info['chksum_sha256'])
                    else:
                        _extract_tar_dir(collection_tar, file_name, b_collection_path)
        except Exception:
            
            shutil.rmtree(b_collection_path)
            b_namespace_path = os.path.dirname(b_collection_path)
            if not os.listdir(b_namespace_path):
                os.rmdir(b_namespace_path)
            raise
    def install_scm(self, b_collection_output_path):