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)

On 17 March 2018 at 21:49, Callum Styan <[email protected]> wrote:

> 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
> "[email protected]:..." 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 [email protected]:org/some_private_repo.git
> some_private_repo failed
>
> --
> 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 [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/ce643c3e-0957-46da-bf9e-7641123386a7%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/ce643c3e-0957-46da-bf9e-7641123386a7%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt8AFo7JPrmE5mOSLSFMtV6TPsZ53pWfqMu1UVHmze0%2BCw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to