wxiaoguang
83df0caf15
Sync gitea app path for git hooks and authorized keys when starting ( #17335 )
...
Gitea writes its own AppPath into git hook scripts. If Gitea's AppPath changes, then the git push will fail.
This PR:
* Introduce an AppState module, it can persist app states into database
* During GlobalInit, Gitea will check if the current AppPath is the same as last one. If they don't match, Gitea will sync git hooks.
* Refactor some code to make them more clear.
* Also, "Detect if gitea binary's name changed" #11341 is related, we call models.RewriteAllPublicKeys to update ssh authorized_keys file
2021-10-21 17:22:43 +08:00
..
2021-09-28 15:19:22 -04:00
2021-09-09 21:13:36 +01:00
2021-10-21 17:22:43 +08:00
2021-08-24 11:47:09 -05:00
2021-09-22 13:38:34 +08:00
2021-06-07 07:27:09 +02:00
2021-07-24 18:03:58 +02:00
2021-09-22 13:38:34 +08:00
2021-10-21 15:37:43 +08:00
2021-10-07 02:03:37 +02:00
2021-10-16 02:14:34 -04:00
2021-10-20 20:10:03 +01:00
2021-09-27 19:07:19 +01:00
2021-06-17 11:35:05 +01:00
2021-07-24 18:03:58 +02:00
2021-07-24 13:00:41 +02:00
2021-10-17 20:47:12 +01:00
2021-10-17 20:47:12 +01:00
2021-10-17 20:47:12 +01:00
2020-10-02 23:37:53 -04:00
2021-09-24 14:29:32 +01:00
2021-10-20 16:37:19 +02:00
2021-09-22 13:38:34 +08:00
2021-10-17 20:47:12 +01:00
2021-07-24 18:03:58 +02:00
2021-10-17 20:47:12 +01:00
2021-09-22 13:38:34 +08:00
2021-10-17 20:47:12 +01:00
2020-11-28 19:37:58 -05:00
2021-10-05 20:39:37 +02:00
2021-10-15 13:47:15 +08:00
2021-05-03 13:24:24 -04:00
2021-10-07 02:03:37 +02:00
2021-09-22 13:38:34 +08:00
2021-06-07 07:27:09 +02:00
2021-09-22 13:38:34 +08:00
2021-09-22 13:38:34 +08:00
2021-04-09 09:40:34 +02:00
2021-08-19 16:41:20 -04:00
2021-09-22 13:38:34 +08:00
2021-10-17 12:43:25 +01:00
2021-09-22 13:38:34 +08:00
2021-07-08 13:38:13 +02:00
2021-09-19 19:49:59 +08:00
2021-10-21 17:22:43 +08:00
2021-07-08 13:38:13 +02:00
2021-10-17 19:51:56 +01:00
2021-10-21 17:22:43 +08:00
2021-10-20 15:55:33 -04:00
2021-09-22 13:38:34 +08:00
2021-10-12 12:47:19 +02:00
2021-09-22 13:38:34 +08:00
2020-01-15 23:58:33 +02:00
2021-09-08 18:43:19 +01:00
2021-10-20 16:37:19 +02:00
2021-10-13 22:50:23 -04:00
2021-10-18 21:12:26 +01:00
2021-04-14 19:52:01 +01:00
2021-07-08 13:38:13 +02:00
2020-10-11 21:27:20 +01:00
2020-12-27 11:34:19 +08:00
2020-04-05 07:20:50 +01:00
2021-10-12 20:11:35 +02:00
2021-10-13 22:50:23 -04:00
2021-10-13 22:50:23 -04:00