How do I Post an SSH Private Key to a Credential through the Ansible Tower API?
Issue
When attempting to post an RSA or DSA SSH private key when creating an Ansible Tower credential through the Ansible Tower API, the private key file must be formatted in the API 'POST' data to remove newline characters and replace them with the escape character, '\n'.
Environment
- Ansible Tower
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
