I am currently using a Linux distribution where Kleopatra has many bugs, which forces me to use the command line for GPG encryption and decryption. I’ve encountered an issue that I can’t find any command online related to signing with one key and encrypting with another different key. Should I sign first with one command and then encrypt with another command?
Use this command:
gpg --recipient <key_of_recipient> --armor --sign --default-key <your_key> --encrypt <file>
You may omit the parameter --default-key
if you only have one secret key.
Edit: It’s also worth to take a look at this manual where the options are explained.