How do I Post an SSH Private Key to a Credential through the Ansible Tower API?

Solution In Progress - Updated -

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, 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