Failed to `launcher rebuild app` for always, how can I replace github to a mainland Chinese mirror?

When I was updating via launcher rebuild app, I always got error like this:

...
I, [2023-02-25T16:34:01.790521 #1]  INFO -- : > cd /var/www/discourse && 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 && 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 && 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 && 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 && sudo -H -E -u discourse git fetch --depth 1 origin stable failed with return #<Process::Status: pid 144 exit 128>
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

I believe that github was banned in mainland China so I need to replace https://github.com with a CN mirror like https://hub.fgit.gq
Is it possible and how can I do that? Thanks!

I have the same error, have you solved the problem now

1 Like

Try using Hongkong server