ansible-local provisioner + galaxy can't seem to access roles in private repositories

233 views
Skip to first unread message

Callum Styan

unread,
Mar 17, 2018, 4:49:26 PM3/17/18
to Packer
I'm using the googlecompute builder with an ansible-local provisioner, which I've passed a galaxy_file. In that galaxy file I've listed some roles that are in private repositories. They're src is specified as the git ssh "g...@github.com:..." address for each repository.

The way I understand it, the default communicator should be ssh, and if I have an ssh-agent running, my ssh credentials should be passed on to the gce instance that is running the build. How come git clone of those private repos fails? The error message is not useful.

    googlecompute:  [WARNING]: - some_private_repo was NOT installed successfully: - command git
    googlecompute: clone g...@github.com:org/some_private_repo.git some_private_repo failed

Rickard von Essen

unread,
Mar 18, 2018, 3:41:02 AM3/18/18
to packe...@googlegroups.com
Before the ansible-local provisioner try adding some debug, something like:

{
  "type": "shell",
  "inline": [
    "echo $SSH_AUTH_SOCK",
    "ssh-agent -L"
  ]
}

And verify that the SSH_AUTH_SOCK environment variable is properly propagated and that you have access to the ssh key. (Verify that the fingerprint of a key that have access to privat git repos is in the list)

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/ce643c3e-0957-46da-bf9e-7641123386a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages