gpg 私钥在 github 机密中使用时无效
我目前正在尝试在 github enterprise 中设置我的 CI,其中一步涉及使用 git Secret。我想在我的 CI 中使用以下命令,
echo -e "$GPG_PRIVATE_KEY" | gpg --batch --yes --passphrase "$GPG_PASSPHRASE" --import
我在 github 的 Secrets 选项卡下创建了两个秘密 GPG_PRIVATE_KEY
GPG_PASSPHRASE
并且密码也工作得很好(与其他命令)。但我无法让私钥工作。我使用了 gpg --armor --export-secret-key [email ] 的输出;protected]
但显然这不是有效的格式,因为 CI 告诉我
gpg: no valid OpenPGP data found.
可以github 不处理导出命令的格式或者我做错了什么?
I am currently trying to set up my CI in github enterprise where one step involves the usage of git secret. I'd like to use the following command in my CI
echo -e "$GPG_PRIVATE_KEY" | gpg --batch --yes --passphrase "$GPG_PASSPHRASE" --import
I created both secrets GPG_PRIVATE_KEY
GPG_PASSPHRASE
under the Secrets tab in github and the passphrase is also working just fine (tested with other commands). But I can't get the private key working. I used the output from gpg --armor --export-secret-key [email protected]
but apparently thats not a valid format since the CI tells me
gpg: no valid OpenPGP data found.
Can github not handle the format from the export command or what am i doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论