@@ -90,6 +90,20 @@ cp gitea /usr/local/bin/gitea
90
90
91
91
See how to create [ Linux service] ({{< relref "run-as-service-in-ubuntu.en-us.md" >}})
92
92
93
+ ## Updating to a new version
94
+
95
+ You can update to a new version of gitea by stopping gitea, replacing the binary at ` /usr/local/bin/gitea ` and restarting the instance.
96
+ The binary file name should not be changed during the update to avoid problems
97
+ in existing repositories.
98
+
99
+ It is recommended you do a [ backup] ({{< relref "doc/usage/backup-and-restore.en-us.md" >}}) before updating your installation.
100
+
101
+ If you have carried out the installation steps as described above, the binary should
102
+ have the generic name ` gitea ` . Do not change this, i.e. to include the version number.
103
+
104
+ See below for troubleshooting instructions to repair broken repositories after
105
+ an update of your gitea version.
106
+
93
107
## Troubleshooting
94
108
95
109
### Old glibc versions
@@ -107,3 +121,25 @@ For errors like `702 runWeb()] [E] Failed to start server: listen tcp 0.0.0.0:30
107
121
bind: address already in use` gitea needs to be started on another free port. This
108
122
is possible using ` ./gitea web -p $PORT ` . It's possible another instance of gitea
109
123
is already running.
124
+
125
+ ### Git error after updating to a new version of gitea
126
+
127
+ If the binary file name has been changed during the update to a new version of gitea,
128
+ git hooks in existing repositories will not work any more. In that case, a git
129
+ error will be displayed when pushing to the repository.
130
+
131
+ ```
132
+ remote: ./hooks/pre-receive.d/gitea: line 2: [...]: No such file or directory
133
+ ```
134
+
135
+ The ` [...] ` part of the error message will contain the path to your previous gitea
136
+ binary.
137
+
138
+ To solve this, go to the admin options and run the task `Resynchronize pre-receive,
139
+ update and post-receive hooks of all repositories` to update all hooks to contain
140
+ the new binary path. Please note that this overwrite all git hooks including ones
141
+ with customizations made.
142
+
143
+ If you aren't using the built-in to Gitea ssh server you will also need to re-write
144
+ the authorized key file by running the `Update the '.ssh/authorized_keys' file with
145
+ Gitea SSH keys.` task in the admin options.
0 commit comments