Packer - issue with cloning a private repo when creating an AMI

214 views
Skip to first unread message

Bia

unread,
Jul 30, 2021, 4:46:04 AM7/30/21
to Packer
Hi everyone,

I am creating an AMI using packer and would like to clone a private bit bucket repo. I have tried to use ssh-agent forwarding, but feels like I am missing something and doesn't work.

I have been running ssh-agent and add your git repo SSH keys into it using ssh-add /path/to/key on my windows local machine.

Then in the json file:

"ssh-keyscan -H bitbucket.org >> ~/.ssh/known_hosts",
"git clone ssh://giturl",

Can you please let me know what can I do in order to accomplish the task?

Any help will be appreciated.

Thank you in advance.

Best regards,
Beatrice
Reply all
Reply to author
Forward
0 new messages