# 如何使用SSH密钥安装托管在私有存储库中的Discourse插件？

**URL:** <https://meta.discourse.org/t/how-to-install-discourse-plugins-hosted-in-private-repositories-using-ssh-key/375854>\
**Category:** Self-hosting\
**Created:** [2025 年7 月 25 日 17:16 UTC](https://meta.discourse.org/t/how-to-install-discourse-plugins-hosted-in-private-repositories-using-ssh-key/375854 "2025-07-25T17:16:18Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

作者： ![copymonopoly](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@copymonopoly](https://meta.discourse.org/u/copymonopoly)\
发布日期： [2025 年7 月 26 日 06:28 UTC](https://meta.discourse.org/t/how-to-install-discourse-plugins-hosted-in-private-repositories-using-ssh-key/375854/8 "2025-07-26T06:28:24Z")

</div>

谢谢，但我已经尝试了您在官方 2014 年指南中描述的方法——我敢肯定， **它不再适用于** 通过 SSH 密钥在引导过程中访问私有存储库。

我也尝试了其中一个回复中提到的较新方法（将 SSH 密钥挂载到容器中并在 `after_code` 中配置 `core.sshCommand`），但不幸的是，在我这里也失败了。在尝试克隆私有插件时，Discourse 仍然会抛出 SSH 权限错误。

如果有一种当前有效且可靠的方法可以在生产环境中将私有存储库与 SSH 结合使用，我将非常感谢更最新的指导。

---

_[View the full topic](https://meta.discourse.org/t/how-to-install-discourse-plugins-hosted-in-private-repositories-using-ssh-key/375854)._
