我搞砸了 文件夹。但是,我仍然有我的GPG公钥和私钥。我无法解锁git crypt。当我列出 gnupg先生 我的mac中的文件夹,它列出了以下文件:
S.gpg-agent S.gpg-agent.extra openpgp-revocs.d pubring.kbx trustdb.gpg S.gpg-agent.browser S.gpg-agent.ssh private-keys-v1.d pubring.kbx~
? 或者有什么办法吗 git crypt解锁 没有那个文件?
因为,你手上有你的公钥和私钥。以下是您需要遵循的步骤:
转到gnugp目录
cd ~/.gnupg
删除损坏的pubring.kbx
rm pubring.kbx
复制pubring.kbx~z~是的pubring.kbx. 这将为您提供一个空的发布,其中将没有任何密钥。这就像是一个新的开始。
cp pubring.kbx~ pubring.kbx
导入公钥
gpg --import <your-public-key-file.asc>