# Credential field in AWX 5.0.0

**URL:** <https://forum.ansible.com/t/credential-field-in-awx-5-0-0/30624>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [June 21, 2019, 7:13am UTC](https://forum.ansible.com/t/credential-field-in-awx-5-0-0/30624 "2019-06-21T07:13:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdmorel](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sdmorel](https://forum.ansible.com/u/sdmorel)\
**Post date:** [June 21, 2019, 7:13am UTC](https://forum.ansible.com/t/credential-field-in-awx-5-0-0/30624/1 "2019-06-21T07:13:47Z")

</div>

Hello all,

I’m migrating our internal AWX from v2.0.1 to v5.0.0 following the recommended [data migration procedure](https://github.com/ansible/awx/blob/devel/DATA_MIGRATION.md) (tower-cli receive/send).  
So far I was able to import inventories, organization, users and projects.  
But I’m stuck at importing job\_templates. The 5.0.0 server returns this error: “Option credential is not a valid option for job\_template \<job\_template\_name\>”  
Effectively, if I try to replicate a simple job\_template in 5.0.0 and export it using tower-cli, I see no “credential” field.  
I guess there was some change in the way a machine credential is linked to a job\_template. But I can’t see where that information is stored.  
Any help with locating the relation between machine credential and job\_templates in the latest version of AWX?

Thanks a lot,  
Sergio

---

<div class="post-metadata">

**Author:** ![sdmorel](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sdmorel](https://forum.ansible.com/u/sdmorel)\
**Post date:** [June 26, 2019, 12:46pm UTC](https://forum.ansible.com/t/credential-field-in-awx-5-0-0/30624/2 "2019-06-26T12:46:58Z")

</div>

Update:

I every job\_template definition in the json file generated with tower-cli receive, deleting the “credentials” key.  
After importing the JSON with tower-cli send into the new AWX instance I had all job\_templates created with the SSH credential field empty (cloud credentials were imported correctly).

Now, I tried to update every job template with the corresponding SSH credential, but:

1. using tower-cli job\_template associate\_credential the server says:

Response: {“error”:“Extra credentials must be network or cloud.”}

1. using tower-cli job\_template modify --credential \<credential\_name\> \<job\_template\_id\> results in the resource being changed according to the CLI and the API logs, but the SSH credential is not associated to the job template.

In the end, I had to manually associate the SSH credential for every job\_template in the web UI.

I understand this is due to some change in the way credentials are associated to job\_templates, but it bothers me how the API just accepts the PATCH operation with no errors.

My tower-cli version:

Tower CLI 3.3.4  
API v2  
GET http:///api/v2/config/  
Params: {}

AWX 5.0.0.0  
Ansible 2.8.1

Hope this helps people facing the same problem.

Regards,  
Sergio

---

<div class="post-metadata">

**Author:** ![Graham\_Neville](https://avatars.discourse-cdn.com/v4/letter/g/f07891/32.png) [@Graham\_Neville](https://forum.ansible.com/u/Graham_Neville)\
**Post date:** [June 26, 2019, 4:51pm UTC](https://forum.ansible.com/t/credential-field-in-awx-5-0-0/30624/3 "2019-06-26T16:51:51Z")

</div>

I have the same issue coming from 4.0.0.0

---

<div class="post-metadata">

**Author:** ![Angel\_F](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@Angel\_F](https://forum.ansible.com/u/Angel_F)\
**Post date:** [June 26, 2019, 9:44pm UTC](https://forum.ansible.com/t/credential-field-in-awx-5-0-0/30624/4 "2019-06-26T21:44:51Z")

</div>

Same problem here, everything migrated but same issue with templates.
