Packer should prompt user to enter password when using a password protected private key file instead of throwing an error message.
nice to have
packer validate myfile.yml
packer build myfile.yml
...
"builders": [
{
"type": "provider",
"organization_id": "{{ user organization_id
}}",
"api_token": "{{ user api_token
}}",
"image": "{{ user image_name
}}",
"region": "par1",
"commercial_type": "GPU1-M",
"ssh_private_key_file": "< PATH TO A PASSWORD PROTECTED KEY FILE >",
"ssh_username": "root"
}
],
...
Hi, thanks for reaching out.
For some context on why we haven't prioritized creating this, most people use Packer as part of a CI pipeline. A Packer build is triggered by a script, and there is no human around to enter a password. In this situation (which represents a majority of Packer runs), hanging indefinitely until a password is entered is not a desirable behavior.
That said, I'd consider merging a change to add this prompt if if was hidden behind a CLI flag. For example, packer build --ask-password example.json
I don't think it's something the team is going to get a chance to work on any time soon, but I'd happily review a community pull request for it.
Most helpful comment
Hi, thanks for reaching out.
For some context on why we haven't prioritized creating this, most people use Packer as part of a CI pipeline. A Packer build is triggered by a script, and there is no human around to enter a password. In this situation (which represents a majority of Packer runs), hanging indefinitely until a password is entered is not a desirable behavior.
That said, I'd consider merging a change to add this prompt if if was hidden behind a CLI flag. For example,
packer build --ask-password example.json
I don't think it's something the team is going to get a chance to work on any time soon, but I'd happily review a community pull request for it.