Skip to content
This repository has been archived by the owner on Feb 20, 2020. It is now read-only.

SSH private key not copying correctly #15

Open
gibbster opened this issue Feb 6, 2015 · 1 comment
Open

SSH private key not copying correctly #15

gibbster opened this issue Feb 6, 2015 · 1 comment

Comments

@gibbster
Copy link

gibbster commented Feb 6, 2015

Hello,

I'm running across this problem which I can't seem to figure out. Any pointers would be appreciated!

While trying to set up SSH, I'm getting the following error:

    amazon-ebs: TASK: [gocd | SSH public key] *************************************************
    amazon-ebs: changed: [127.0.0.1]
    amazon-ebs:
    amazon-ebs: TASK: [gocd | SSH private key] ************************************************
    amazon-ebs: fatal: [127.0.0.1] => input file not found at /tmp/packer-provisioner-ansible-local/roles/gocd/files/build_id_rsa, or /tmp/packer-provisioner-ansible-local/build_id_rsa,

What's odd is that 1: the private key is copied correctly, and 2: the public and private key are both present in the source directory:

ls -l /tmp/packer-provisioner-ansible-local/roles/gocd/files/
total 16
-rw-r--r-- 1 ubuntu ubuntu 1675 Feb  6 01:58 build_id_rsa
-rw-r--r-- 1 ubuntu ubuntu  398 Feb  6 01:58 build_id_rsa.pub

For reference, here is the configuration I'm using:

  vars:
    GOCD_SCM_GIT: true,
    GOCD_CONFIGURE_SSH: true,
    GOCD_SSH_PRIVATE_KEY: build_id_rsa,
    GOCD_SSH_PUBLIC_KEY: build_id_rsa.pub

I'm confused why it works for the public key but not the private key. Any thoughts?

Thanks!
David

@tpbrown
Copy link
Contributor

tpbrown commented Feb 19, 2015

Hi @gibbster - did you get this sorted out? I'm not able to duplicate it.

Would it be possible to run Ansible in verbose and share the log snippet around the copying of the key?

BTW: chmod 600 that private key! ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants