# Fehler beim \`launcher rebuild app\` für immer, wie kann ich GitHub durch einen chinesischen Mirror ersetzen?

**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:** [25. Februar 2023 um 16:43 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:** 5
**Page:** 1

<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: [25. Februar 2023 um 16:43 UTC](https://meta.discourse.org/t/failed-to-launcher-rebuild-app-for-always-how-can-i-replace-github-to-a-mainland-chinese-mirror/256248/1 "2023-02-25T16:43:29Z")

</div>

Bei der Aktualisierung über `launcher rebuild app` erhalte ich immer wieder eine Fehlermeldung wie diese:

```plaintext
...
I, [2023-02-25T16:34:01.790521 #1] INFO -- : 
> cd /var/www/discourse &amp;&amp; sudo -H -E -u discourse git clean -f
I, [2023-02-25T16:34:01.969445 #1] INFO -- : 
I, [2023-02-25T16:34:01.969665 #1] INFO -- : 
> cd /var/www/discourse &amp;&amp; sudo -H -E -u discourse git remote set-branches --add origin main
I, [2023-02-25T16:34:01.980319 #1] INFO -- : 
I, [2023-02-25T16:34:01.980423 #1] INFO -- : 
> cd /var/www/discourse &amp;&amp; sudo -H -E -u discourse git remote set-branches origin stable
I, [2023-02-25T16:34:01.991560 #1] INFO -- : 
I, [2023-02-25T16:34:01.991883 #1] INFO -- : 
> cd /var/www/discourse &amp;&amp; sudo -H -E -u discourse git fetch --depth 1 origin stable
fatal: unable to access 'https://github.com/discourse/discourse.git/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.
...
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse &amp;&amp; sudo -H -E -u discourse git fetch --depth 1 origin stable failed with return #&lt;Process::Status: pid 144 exit 128&gt;
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"code", "cmd"=>["sudo -H -E -u discourse git reset --hard", "sudo -H -E -u discourse git clean -f", "sudo -H -E -u discourse git remote set-branches --add origin main", "sudo -H -E -u discourse git remote set-branches origin $version", "sudo -H -E -u discourse git fetch --depth 1 origin $version", "sudo -H -E -u discourse git checkout $version", "mkdir -p tmp", "chown discourse:www-data tmp", "mkdir -p tmp/pids", "mkdir -p tmp/sockets", "touch tmp/.gitkeep", "mkdir -p /shared/log/rails", "bash -c \"touch -a /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log\"", "bash -c \"ln -s /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log $home/log\"", "bash -c \"mkdir -p /shared/{uploads,backups}\"", "bash -c \"ln -s /shared/{uploads,backups} $home/public\"", "bash -c \"mkdir -p /shared/tmp/{backups,restores}\"", "bash -c \"ln -s /shared/tmp/{backups,restores} $home/tmp\"", "chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp\"", "[! -d public/plugins] || find public/plugins/ -maxdepth 1 -xtype l -delete"]}
bootstrap failed with exit code 128
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
751de54716a7a145e5dc813d9b25330322dbcd69ec1a047d38267c86a57a990c

```

Ich glaube, dass GitHub in Festlandchina gesperrt wurde, daher muss ich `https://github.com` durch einen CN-Spiegel wie `https://hub.fgit.gq` ersetzen.  
Ist das möglich und wie kann ich das tun? Danke!

---

<div class="post-metadata">

### Author: ![linyuiu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/linyuiu/32/298023_2.png) [@linyuiu](https://meta.discourse.org/u/linyuiu)
#### Post date: [26. April 2023 um 07:50 UTC](https://meta.discourse.org/t/failed-to-launcher-rebuild-app-for-always-how-can-i-replace-github-to-a-mainland-chinese-mirror/256248/2 "2023-04-26T07:50:32Z")

</div>

Ich habe den gleichen Fehler, haben Sie das Problem jetzt gelöst?

---

<div class="post-metadata">

### Author: ![Dotila\_Li](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dotila_li/32/303426_2.png) [@Dotila\_Li](https://meta.discourse.org/u/Dotila_Li)
#### Post date: [10. Mai 2023 um 16:06 UTC](https://meta.discourse.org/t/failed-to-launcher-rebuild-app-for-always-how-can-i-replace-github-to-a-mainland-chinese-mirror/256248/3 "2023-05-10T16:06:37Z")

</div>

Versuchen Sie, den Hongkong-Server zu verwenden

---

<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: [7. Februar 2025 um 10:57 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>

Fügen Sie den folgenden Code in `templates/web.china.template.yml` ein:

```plaintext
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'

```

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [9. März 2025 um 10:57 UTC](https://meta.discourse.org/t/failed-to-launcher-rebuild-app-for-always-how-can-i-replace-github-to-a-mainland-chinese-mirror/256248/5 "2025-03-09T10:57:34Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
