From 13d5cdf8f390a0fb8f84f7d27859c709a573fc88 Mon Sep 17 00:00:00 2001 From: bkroll <10960255+bkroll@users.noreply.github.com> Date: Mon, 23 Jul 2018 14:39:17 +0200 Subject: [PATCH 1/3] documentation as requested in go-gitea/gitea#3817 --- .../doc/installation/from-binary.en-us.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/content/doc/installation/from-binary.en-us.md b/docs/content/doc/installation/from-binary.en-us.md index f393333e4..8847b3083 100644 --- a/docs/content/doc/installation/from-binary.en-us.md +++ b/docs/content/doc/installation/from-binary.en-us.md @@ -90,6 +90,18 @@ cp gitea /usr/local/bin/gitea See how to create [Linux service]({{< relref "run-as-service-in-ubuntu.en-us.md" >}}) +## Updating to a new version + +You can update to a new version of gitea by replacing the binary at `/usr/local/bin/gitea`. +The binary file name should not be changed during the update to avoid problems +in existing repositories. + +If you have carried out the installation steps as described above, the binary should +have the generic name `gitea`. Do not change this, i.e. to include the version number. + +See below for troubleshooting instructions to repair broken repositories after +an update of your gitea version. + ## Troubleshooting ### Old glibc versions @@ -107,3 +119,20 @@ For errors like `702 runWeb()] [E] Failed to start server: listen tcp 0.0.0.0:30 bind: address already in use` gitea needs to be started on another free port. This is possible using `./gitea web -p $PORT`. It's possible another instance of gitea is already running. + +### Git error after updating to a new version of gitea + +If the binary file name has been changed during the update to a new version of gitea, +git hooks in existing repositories will not work any more. In that case, a git +error will be displayed when pushing to the repository. + +``` +remote: ./hooks/pre-receive.d/gitea: line 2: [...]: No such file or directory +``` + +The `[...]` part of the error message will contain the path to your previous gitea +binary. + +To solve this, go to the admin options and run the task `Resynchronize pre-receive, +update and post-receive hooks of all repositories` to update all hooks to contain +the new binary path. \ No newline at end of file From 8ae791cdc888938a3281f6ce57563c4e43375b1a Mon Sep 17 00:00:00 2001 From: bkroll <10960255+bkroll@users.noreply.github.com> Date: Mon, 23 Jul 2018 17:20:35 +0200 Subject: [PATCH 2/3] added backup and start/stop --- docs/content/doc/installation/from-binary.en-us.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/content/doc/installation/from-binary.en-us.md b/docs/content/doc/installation/from-binary.en-us.md index 8847b3083..385e95c4f 100644 --- a/docs/content/doc/installation/from-binary.en-us.md +++ b/docs/content/doc/installation/from-binary.en-us.md @@ -92,10 +92,12 @@ See how to create [Linux service]({{< relref "run-as-service-in-ubuntu.en-us.md" ## Updating to a new version -You can update to a new version of gitea by replacing the binary at `/usr/local/bin/gitea`. +You can update to a new version of gitea by stopping gitea, replacing the binary at `/usr/local/bin/gitea` and restarting the instance. The binary file name should not be changed during the update to avoid problems in existing repositories. +It is recommended you do a [backup]({{< relref "../usage/backup-and-restore.en-us.md" >}}) before updating your installation. + If you have carried out the installation steps as described above, the binary should have the generic name `gitea`. Do not change this, i.e. to include the version number. From 8817e749b84cedfbc44f9d2434dcb9c9aa2a1eeb Mon Sep 17 00:00:00 2001 From: bkroll <10960255+bkroll@users.noreply.github.com> Date: Wed, 25 Jul 2018 09:37:19 +0200 Subject: [PATCH 3/3] link syntax --- docs/content/doc/installation/from-binary.en-us.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/doc/installation/from-binary.en-us.md b/docs/content/doc/installation/from-binary.en-us.md index 385e95c4f..df75d142c 100644 --- a/docs/content/doc/installation/from-binary.en-us.md +++ b/docs/content/doc/installation/from-binary.en-us.md @@ -96,7 +96,7 @@ You can update to a new version of gitea by stopping gitea, replacing the binary The binary file name should not be changed during the update to avoid problems in existing repositories. -It is recommended you do a [backup]({{< relref "../usage/backup-and-restore.en-us.md" >}}) before updating your installation. +It is recommended you do a [backup]({{< relref "doc/usage/backup-and-restore.en-us.md" >}}) before updating your installation. If you have carried out the installation steps as described above, the binary should have the generic name `gitea`. Do not change this, i.e. to include the version number.