To use hammer without a password, we have to store the credentials in a file under the users home directory.
On the server you have hammer installed create a file called ~/.hammer/cli_config.yml
$ mkdir -p ~/.hammer/log $ vi ~/.hammer/cli_config.yml
Add the following content, replacing USERNAME and PASSWORD with the username and password for the satellite host specified by HOSTNAME.
:ui: :interactive: true :per_page: 200 :history_file: '~/.hammer/history' :foreman: :host: 'https://HOSTNAME/' :username: USERNAME :password: PASSWORD :log_dir: '~/.hammer/log' :log_level: 'error'
Now we need to lock down access to the file by setting the permissions to the owner only.
$ chmod 600 ~/.hammer/cli_config.yml
You can now use hammer without specifying the username and password each time.