Why Does the AWX Command Line Interface not Respond with the Authentication Error Even If the Username and Password are Correct?

Solution Verified - Updated -

Issue

  • Why does the AWX command line interface not respond with the authentication error even if the username and password are correct?

    The following command returns a valid token without issue,

    $ awx -k -f human --conf.host https://Tower --conf.username admin --conf.password password_for_admin_user login
    export TOWER_OAUTH_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXX
    

    But the following one fails with "Valid credentials were not provided." even if I use the same username and password.

    $ awx -k -f human --conf.host https://Tower --conf.username admin --conf.password password_for_admin_user projects list 
    usage: awx [--help] [--version] [--conf.host https://example.awx.org]
               [--conf.token TEXT] [--conf.username TEXT] [--conf.password TEXT]
               [-k] [-f {json,yaml,jq,human}] [--filter TEXT]
               [--conf.color BOOLEAN] [-v]
               resource ...
    
    …
    Valid credentials were not provided.
    $ awx login --help
    

Environment

  • Ansible Tower >= 3.7
  • AWX Command Line Interface

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content