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-07-24 11:16:34 +01:00
2021-09-24 19:32:56 +08:00
2021-10-21 17:22:43 +08:00
2021-07-24 18:03:58 +02:00
2021-03-14 19:52:12 +01:00
2021-05-10 07:45:17 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-05-10 07:45:17 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-07-08 13:38:13 +02:00
2021-03-14 19:52:12 +01:00
2021-09-22 13:38:34 +08:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-07-24 18:03:58 +02:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-07-08 13:38:13 +02:00
2021-05-12 01:11:42 -04:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-07-23 12:41:27 +08:00
2021-07-23 12:41:27 +08:00
2021-04-13 20:04:17 -04:00
2021-03-19 21:01:24 +02:00
2021-03-18 02:06:40 -04:00
2021-03-24 19:27:22 +01:00
2021-03-24 19:27:22 +01:00
2021-03-24 19:27:22 +01:00
2021-03-24 19:27:22 +01:00
2021-04-08 18:25:57 -04:00
2021-04-14 14:02:12 +02:00
2021-07-24 18:03:58 +02:00
2021-06-08 11:52:51 +08:00
2021-06-23 17:12:38 -04:00
2021-08-25 09:42:51 +01:00
2021-08-25 09:42:51 +01:00
2021-06-14 19:20:43 +02:00
2021-06-16 18:02:24 -04:00
2021-06-23 17:12:38 -04:00
2021-06-25 16:28:55 +02:00
2021-06-27 20:21:09 +01:00
2021-07-13 15:28:07 +02:00
2021-07-24 18:03:58 +02:00
2021-07-24 18:03:58 +02:00
2021-07-28 17:42:56 +08:00
2021-08-22 23:33:05 +08:00
2021-08-25 09:42:51 +01:00
2021-09-08 17:19:30 +02:00
2021-09-08 17:19:30 +02:00
2021-09-11 16:21:17 +02:00
2021-09-23 18:50:06 +08:00
2021-09-23 18:50:06 +08:00
2021-09-29 22:53:12 +02:00
2021-10-08 19:03:04 +02:00
2021-10-10 18:40:03 -04:00
2021-10-16 02:14:34 -04:00
2021-10-21 17:22:43 +08:00