# Falha ao executar \`launcher rebuild app\` para sempre, como posso substituir o GitHub por um espelho na China continental?

**URL:** <https://meta.discourse.org/t/failed-to-launcher-rebuild-app-for-always-how-can-i-replace-github-to-a-mainland-chinese-mirror/256248>\
**Category:** Self-hosting\
**Created:** [Fevereiro 25, 2023, 4:43pm UTC](https://meta.discourse.org/t/failed-to-launcher-rebuild-app-for-always-how-can-i-replace-github-to-a-mainland-chinese-mirror/256248 "2023-02-25T16:43:29Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![snakeninny](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/snakeninny/32/115522_2.png) [@snakeninny](https://meta.discourse.org/u/snakeninny)\
**Post date:** [Fevereiro 7, 2025, 10:57am UTC](https://meta.discourse.org/t/failed-to-launcher-rebuild-app-for-always-how-can-i-replace-github-to-a-mainland-chinese-mirror/256248/4 "2025-02-07T10:57:27Z")

</div>

Coloque o seguinte código em `templates/web.china.template.yml`:

```yaml
hooks:
  before_code:
    - exec:
        cmd:
          - su discourse -c 'git config --global url."https://githubfast.com/".insteadOf "https://github.com/"'

  before_web:
    - exec:
        cmd:
          - su discourse -c 'gem sources --add https://mirrors.tuna.tsinghua.edu.cn/rubygems/ --remove https://rubygems.org/'
          - su discourse -c 'bundle config mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems'

  before_yarn:
    - exec:
        cmd:
          - su discourse -c 'yarn config set registry https://mirrors.huaweicloud.com/repository/npm/'
          - su discourse -c 'pnpm config set registry https://mirrors.huaweicloud.com/repository/npm/'

  before_bundle_exec:
    - exec:
        cmd:
          - su discourse -c 'bundle config mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems'

```

---

_[View the full topic](https://meta.discourse.org/t/failed-to-launcher-rebuild-app-for-always-how-can-i-replace-github-to-a-mainland-chinese-mirror/256248)._
