<div dir="ltr">I have exported a gpg key from linux to Mac. Exporting commands on linux are as follows<br><br>```<br>gpg --export-secret-keys -a test_01.asc<br>gpg --export -a test_01_pub.asc<br>```<br><br>Importing commands on Mac are as follows<br><br>```<br>gpg --import test_01.asc<br>gpg --import test_01_pub.asc<br>```<br><br>But when decrypting with the imported key, <br><br>```<br>gpg -d -vvv test_01.gpg<br>```<br><br>gpg said<br><br>```<br>gpg: using character set 'utf-8'<br>gpg: enabled compatibility flags:<br># off=0 ctb=85 tag=1 hlen=3 plen=268<br>:pubkey enc packet: version 3, algo 1, keyid XXXXXXXXXXXXXXXX<br>        data: [2048 bits]<br>gpg: public key is XXXXXXXXXXXXXXXX<br># off=271 ctb=d2 tag=18 hlen=2 plen=62 new-ctb<br>:encrypted data packet:<br>        length: 62<br>        mdc_method: 2<br>gpg: using subkey XXXXXXXXXXXXXXXX instead of primary key XXXXXXXXXXXXXXXX<br>gpg: encrypted with rsa2048 key, ID XXXXXXXXXXXXXXXX, created xxxx-xx-xx<br>      "xxx <<a href="mailto:xxx@xxx.com">xxx@xxx.com</a>>"<br>gpg: public key decryption failed: Bad secret key<br>gpg: decryption failed: Bad secret key<br>```<br><br>And when I tried to change its passwd, gpg said<br><br>```<br>error getting keyinfo from agent: System error w/o errno<br>pKey has only stub or on-card key items - no passphrase to change.<br>```<br><br>The versions of gpgs on Linux and Mac are 2.2.41 and 2.4.0<br></div>