I have accidentally put winehq.key into /etc/bash_completion.d/ in the process of docker-machine completion installation.

I've tried to set up docker-machine auto completion and followed these instructions from the official website: https://docs.docker.com/machine/completion/

I've copied this to my terminal:

sudo curl -L https://raw.githubusercontent.com/docker/machine/v0.16.0/contrib/completion/bash/docker-machine.bash -o /etc/bash_completion.d/docker-machine

Now every time I open a new terminal, it tries to run something that looks like the following:

-----BEGIN: command not found
mQGNBFwOmrgBDAC9FZW3dFpew1hwDaqRfdQQ1ABcmOYu1NKZHwYjd+bGvcR2LRGe: command not found
bash: R5dfRqG1Uc/5r6CPCMvnWxFprymkqKEADn8eFn+aCnPx03HrhA+lNEbciPfTHylt: No such file or directory
bash: 6jCdl6eoCCkKNOIbr/MMSkd2KqAqDVM5cnnlQ7q+AXzwNpj3RGJVoBxbS0nn9JWY: No such file or directory
QNQrWh9rAcMIGT+b1le0: command not found
=4lsa: command not found
-----END: command not found

I did not copy everything just a few lines.

I removed the file I copied using curl, but it did not work. It seems that there is nothing new in ~/.bashrc as well. How to prevent terminal from running this on startup?

  • 1
    It appears to try to execute a GnuPG/PGP key or message. Have you also looked in ~/.bash_profile and/or ~/.profile? Do you have calls to gpg in any of these files? – Kusalananda Mar 15 '19 at 9:52
  • I don't have ~/.bash_profile and ~/.profile was last modified a year ago – YKY Mar 15 '19 at 9:57
  • 1
    welcome, Check the filenames under /etc/bash_completion.d/ directory and its contents. You have added the gpg key of winhq somewhere. – GAD3R Mar 15 '19 at 10:30
  • 1
    thanks. It was winehq.key in bash_completion.d directory. You can post it as an answer. – YKY Mar 15 '19 at 10:31

Check the filenames under /etc/bash_completion.d/ directory and its contents. You have added the gpg key of winehq somewhere.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.