# 无法在 Windows 上克隆 Discourse 的仓库

**URL:** <https://meta.discourse.org/t/unable-to-clone-discourses-repo-on-windows/313638>\
**Category:** Bug\
**Tags:** fixed\
**Created:** [2024年六月25日 18:37 UTC](https://meta.discourse.org/t/unable-to-clone-discourses-repo-on-windows/313638 "2024-06-25T18:37:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pangbo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pangbo/32/538562_2.png) [@pangbo](https://meta.discourse.org/u/pangbo)\
**Post date:** [2024年六月25日 18:37 UTC](https://meta.discourse.org/t/unable-to-clone-discourses-repo-on-windows/313638/1 "2024-06-25T18:37:39Z")

</div>

在 Windows 上尝试克隆 Discourse 的仓库时，我遇到了以下错误：

 ![](https://global.discourse-cdn.com/meta/original/4X/e/4/7/e47455383c49b82f7d0795316e354a4d6de32d71.png)

错误消息指示路径无效：`flags-index.hbs ./config`。

我在 GitHub 上找到了这个文件：  
[https://github.com/discourse/discourse/blob/main/app/assets/javascripts/admin/addon/templates/flags-index.hbs%20./config](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/admin/addon/templates/flags-index.hbs%20./config)

文件名包含空格和点，这似乎不是一个有效的文件名。

我怀疑正确的文件名应该是 `flags-index.hbs`。

修复此问题的 PR：

> <https://github.com/discourse/discourse/pull/27611>
>
> When I attempt to clone this repository on Windows, I encounter the following er…ror: 
> 
> !\[image\](https://github.com/discourse/discourse/assets/51732678/d87e1bd4-081b-4de9-b876-58ac143f748d)
> 
> The error message indicates an invalid path: \`flags-index.hbs ./config\`.
> 
> I found this file: 
> 
> https://github.com/discourse/discourse/blob/0d6bd5207d21de97c864d181b51b8ac41f20beb0/app/assets/javascripts/admin/addon/templates/flags-index.hbs%20./config
> 
> The filename contains a space and a dot, which does not seem to be a valid filename.
> 
> I suspect the correct filename should be \`flags-index.hbs\`.

---

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2024年六月25日 18:43 UTC](https://meta.discourse.org/t/unable-to-clone-discourses-repo-on-windows/313638/2 "2024-06-25T18:43:07Z")

</div>

还有  
[https://github.com/discourse/discourse/blob/main/app/assets/javascripts/admin/addon/templates/config-flags-index.hbs](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/admin/addon/templates/config-flags-index.hbs)

---

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [2024年六月25日 18:43 UTC](https://meta.discourse.org/t/unable-to-clone-discourses-repo-on-windows/313638/3 "2024-06-25T18:43:57Z")

</div>

供参考，这已在此处引入：

> <https://github.com/discourse/discourse/pull/27171>
>
> UI for admins to disable system flags.
> 
> \<img width="1441" alt="Screenshot 2024…-05-24 at 2 22 08 PM" src="https://github.com/discourse/discourse/assets/72780/20edb120-ee6a-465d-b2f6-a67868ddb9ba"\>

---

<div class="post-metadata">

**Author:** ![pangbo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pangbo/32/538562_2.png) [@pangbo](https://meta.discourse.org/u/pangbo)\
**Post date:** [2024年六月25日 19:10 UTC](https://meta.discourse.org/t/unable-to-clone-discourses-repo-on-windows/313638/4 "2024-06-25T19:10:41Z")

</div>

看起来应该移除 `flags-index.hbs ./config`。

> [@pangbo](#):
>
> 我怀疑正确的文件名应该是 `flags-index.hbs`。

它的正确名称是 `config-flags-index.hbs` 😂

---

<div class="post-metadata">

**Author:** ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)\
**Post date:** [2024年六月26日 02:50 UTC](https://meta.discourse.org/t/unable-to-clone-discourses-repo-on-windows/313638/7 "2024-06-26T02:50:28Z")

</div>

感谢您通过 [FIX: invalid path (#27611) · discourse/discourse@4e42dc8 · GitHub](https://github.com/discourse/discourse/commit/4e42dc8d601a434bf70889f0c53954bc6733952e) 修复此问题，对此我们感到抱歉！现在关闭此主题 🙂

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2024年六月29日 07:00 UTC](https://meta.discourse.org/t/unable-to-clone-discourses-repo-on-windows/313638/10 "2024-06-29T07:00:36Z")

</div>

此主题已在 3 天后自动关闭。不再允许回复。
