dhoeric / vscode-ansible-vault

VSCode plugin for encrypt/decrypt with ansible-vault
https://marketplace.visualstudio.com/items?itemName=dhoeric.ansible-vault
24 stars 16 forks source link

GetPassWarning: Can not control echo on the terminal. #34

Open filviu opened 4 years ago

filviu commented 4 years ago

Hi,

I'm getting this when working with vscode (remote connected to a linux box). It's running fine inside wsl - I'm only getting this on this remote box. Any hints what I'm doing wrong ?

Thanks !

Command 'Ansible Vault: Encrypt/Decrypt' resulted in an error (Command failed: ansible-vault decrypt "xxxx/ansible-playbooks/vars/encrypted.yml" /usr/lib/python3.7/getpass.py:91: GetPassWarning: Can not control echo on the terminal. passwd = fallback_getpass(prompt, stream) Warning: Password input may be echoed. Vault password: [WARNING]: Error in vault password prompt (default): EOFError (ctrl-d) on prompt for (default) ERROR! EOFError (ctrl-d) on prompt for (default) )
richardforth commented 8 months ago

I get the same when trying to retreive secrets from ansible-vault in a cron job from within a shell script, the same command woks fine interactively.

richardforth commented 8 months ago

I fixed my cronjob issue (giving the same error you mentioned) by adding an environment variable to it at the top

ANSIBLE_VAULT_PASSWORD_FILE=/path-to-my/.ansible_vault_password

so you may want to look at making sure you have an environment variable set up somewhere in this vscode plugin. Hope that helps to get you one step closer to solving it.