# Test Project SCM Type git not working

**URL:** <https://forum.ansible.com/t/test-project-scm-type-git-not-working/26541>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [January 23, 2018, 2:18pm UTC](https://forum.ansible.com/t/test-project-scm-type-git-not-working/26541 "2018-01-23T14:18:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rickv](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@rickv](https://forum.ansible.com/u/rickv)\
**Post date:** [January 23, 2018, 2:18pm UTC](https://forum.ansible.com/t/test-project-scm-type-git-not-working/26541/1 "2018-01-23T14:18:29Z")

</div>

Hi,

I installed awx 1.0.2.70 and git CE 10.3.3 (https enabled) and can access both via localhost. After setting up a test project in awx (SCM URL [https://localhost:50443/rickv/ansible-ae](https://localhost:50443/rickv/ansible-ae)) and running “Start an SCM update” I see the following error messages in STANDARD OUT:

TASK [update project using git] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* fatal: [localhost]: FAILED! =\> {“changed”: false, “cmd”: “/usr/bin/git clone --origin origin ‘https://$encrypted$:$encrypted$@localhost:50443/rickv/ansible-ae’ /var/lib/awx/projects/\_6\_\_ansible\_test\_project”, “msg”: “Cloning into ‘/var/lib/awx/projects/\_6\_\_ansible\_test\_project’…\nfatal: unable to access ‘https://$encrypted$:$encrypted$@localhost:50443/rickv/ansible-ae/’: Failed to connect to ::1: Cannot assign requested address”, “rc”: 128, “stderr”: “Cloning into ‘/var/lib/awx/projects/\_6\_\_ansible\_test\_project’…\nfatal: unable to access ‘https://$encrypted$:$encrypted$@localhost:50443/rickv/ansible-ae/’: Failed to connect to ::1: Cannot assign requested address\n”, “stderr\_lines”: [“Cloning into ‘/var/lib/awx/projects/\_6\_\_ansible\_test\_project’…”, “fatal: unable to access ‘https://$encrypted$:$encrypted$@localhost:50443/rickv/ansible-ae/’: Failed to connect to ::1: Cannot assign requested address”], “stdout”: “”, “stdout\_lines”: } PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* localhost : ok=0 changed=0 unreachable=0 failed=1

The awx Demo Project SCM update is working fine. Looks like awx can’t access my test project SCM URL but I don’t understand why it can’t?

Thanks,  
Rick

---

<div class="post-metadata">

**Author:** ![Christopher\_Meyers](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@Christopher\_Meyers](https://forum.ansible.com/u/Christopher_Meyers)\
**Post date:** [January 23, 2018, 5:39pm UTC](https://forum.ansible.com/t/test-project-scm-type-git-not-working/26541/2 "2018-01-23T17:39:35Z")

</div>

Rick,

localhost:50443 … Since the git clone is happening in the AWX docker container; localhost is the container host.

---

<div class="post-metadata">

**Author:** ![rpetrell](https://avatars.discourse-cdn.com/v4/letter/r/b4bc9f/32.png) [@rpetrell](https://forum.ansible.com/u/rpetrell)\
**Post date:** [January 23, 2018, 5:42pm UTC](https://forum.ansible.com/t/test-project-scm-type-git-not-working/26541/3 "2018-01-23T17:42:50Z")

</div>

Rick,

Assuming you’ve deployed awx with openshift, the git clone actually runs _inside_ one of the containers, so `localhost` isn’t going to resolve outside of the container where the `git clone` is running. If your git server doesn’t have a fully qualified domain name, you’ll need to add a service definition for the external git server so that you can connect to it: [https://docs.openshift.com/enterprise/3.1/dev\_guide/integrating\_external\_services.html](https://docs.openshift.com/enterprise/3.1/dev_guide/integrating_external_services.html)

[https://github.com/ansible/awx/blob/devel/installer/openshift/templates/deployment.yml.j2](https://github.com/ansible/awx/blob/devel/installer/openshift/templates/deployment.yml.j2)

---

<div class="post-metadata">

**Author:** ![rickv](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@rickv](https://forum.ansible.com/u/rickv)\
**Post date:** [January 24, 2018, 1:21pm UTC](https://forum.ansible.com/t/test-project-scm-type-git-not-working/26541/4 "2018-01-24T13:21:53Z")

</div>

Thanks Christopher and Ryan for the helpful explanations/information.  
I deployed AWX with standalone Docker daemon (not Openshift). The git server doesn’t have a fully qualified domain name.

Do I need to set awx\_container\_search\_domains in awx/installer/inventory?

# Container networking configuration

# Set the awx\_task and awx\_web containers’ search domain(s)

#awx\_container\_search\_domains=[example.com](http://example.com),[ansible.com](http://ansible.com)

---

<div class="post-metadata">

**Author:** ![rickv](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@rickv](https://forum.ansible.com/u/rickv)\
**Post date:** [January 29, 2018, 1:13pm UTC](https://forum.ansible.com/t/test-project-scm-type-git-not-working/26541/5 "2018-01-29T13:13:16Z")

</div>

I was able to setup an awx test project/credential/inventory/template and run the template successfully. But I’m sure there is a better/correct way to setup such a test project. What I did:  
In awx  
Created “Ansible Test Project”:

 ![](https://us1.discourse-cdn.com/ansible/original/2X/1/135777f19ac39c612075a04ddc2349c6b79865e8.png)

Created “Ansible Test Credential”:

 ![](https://us1.discourse-cdn.com/ansible/original/2X/3/308fb237de0339aaf1c97e776c2b9c76f72659c5.png)

Created “Ansible Test Inventory” with one host (localhost):

 ![](https://us1.discourse-cdn.com/ansible/original/2X/9/9207db61bc0896311f9ed53fb3a992175f3c27d6.png)

Created “Ansible Test Job Template”:

 ![](https://us1.discourse-cdn.com/ansible/original/2X/5/557dbdb5c2ad03f36820c3c249bf3a4d5dd65660.png)

I configured the git container to use http and in order for awx to access it, I logged into each of the containers awx\_web and awx\_task and added the git container ip (determined using docker network inspect bridge) to the hosts file.

The hello\_world.yml playbook on git:

`
