1
0
Fork 0
forked from forgejo/forgejo

Import docs into main repository (#2874)

* import docs into main repository

Signed-off-by: Matti Ranta <matti@mdranta.net>
This commit is contained in:
techknowlogick 2017-11-26 16:44:32 -05:00 committed by Lauris BH
parent f148a4a1ed
commit fb5c6b6444
68 changed files with 3720 additions and 0 deletions

View file

@ -0,0 +1,82 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "Upgrade from Gogs"
slug: "upgrade-from-gogs"
weight: 10
toc: true
draft: false
menu:
sidebar:
parent: "upgrade"
name: "From Gogs"
weight: 10
identifier: "upgrade-from-gogs"
---
# Upgrade from Gogs
Gogs versions up to 0.9.146 (db schema version 15) can be smoothly upgraded to Gitea.
There are some steps to do so below. On Unix run as your Gogs user:
* Create a Gogs backup with `gogs dump`. This creates `gogs-dump-[timestamp].zip` file containing all your Gogs data.
* Download the file matching your platform from the [downloads page](https://dl.gitea.io/gitea).
* Put the binary at the desired install location.
* Copy `gogs/custom/conf/app.ini` to `gitea/custom/conf/app.ini`.
* If you have custom `templates, public` in `gogs/custom/` copy them to `gitea/custom/`.
* If you have any other custom folders like `gitignore, label, license, locale, readme` in `gogs/custom/conf` copy them to `gitea/custom/options`.
* Copy `gogs/data/` to `gitea/data/`. It contains issue attachments and avatars.
* Verify by starting Gitea with `gitea web`.
* Enter Gitea admin panel on the UI, run `Rewrite '.ssh/authorized_keys' file`, then run `Rewrite all update hook of repositories` (needed when custom config path is changed).
### Change gogs specific information:
* Rename `gogs-repositories/` to `gitea-repositories/`
* Rename `gogs-data/` to `gitea-data/`
* In your `gitea/custom/conf/app.ini` change:
FROM:
```
[database]
PATH = /home/:USER/gogs/data/:DATABASE.db
[attachment]
PATH = /home/:USER/gogs-data/attachments
[picture]
AVATAR_UPLOAD_PATH = /home/:USER/gogs-data/avatars
[log]
ROOT_PATH = /home/:USER/gogs/log
```
TO:
```
[database]
PATH = /home/:USER/gitea/data/:DATABASE.db
[attachment]
PATH = /home/:USER/gitea-data/attachments
[picture]
AVATAR_UPLOAD_PATH = /home/:USER/gitea-data/avatars
[log]
ROOT_PATH = /home/:USER/gitea/log
```
* Verify by starting Gitea with `gitea web`
### Troubleshooting
* If you encounter errors relating to custom templates in the `gitea/custom/templates` folder, try moving the templates causing the errors away one by one. They may not be compatible with Gitea.
### Add Gitea to startup on Unix
Update the appropriate file from [gitea/contrib](https://github.com/go-gitea/gitea/tree/master/contrib) with the right environment variables.
For distro's with systemd:
* Copy the updated script to `/etc/systemd/system/gitea.service`
* Add the service to the startup with: `sudo systemctl enable gitea`
* Disable old gogs startup script: `sudo systemctl disable gogs`
For distro's with SysVinit:
* Copy the updated script to `/etc/init.d/gitea`
* Add the service to the startup with: `sudo rc-update add gitea`
* Disable old gogs startup script: `sudo rc-update del gogs`

View file

@ -0,0 +1,26 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "从 Gogs 升级"
slug: "upgrade-from-gogs"
weight: 10
toc: true
draft: false
menu:
sidebar:
parent: "upgrade"
name: "从 Gogs 升级"
weight: 10
identifier: "upgrade-from-gogs"
---
# 从 Gogs 升级
如果你正在运行Gogs 0.9.146以下版本你可以平滑的升级到Gitea。该升级需要如下的步骤
* 停止 Gogs 的运行
* 拷贝 Gogs 的配置文件 `custom/conf/app.ini` 到 Gitea 的相应位置。
* 拷贝 Gitea 的 `options/` 到 Home 目录下。
* 如果你还有更多的自定义内容比如templates和localization文件你需要手工合并你的修改到 Gitea 的 Options 下对应目录。
* 拷贝 Gogs 的数据目录 `data/` 到 Gitea 相应位置。这个目录包含附件和头像文件。
* 运行 Gitea
* 登陆 Gitea 并进入 管理面板, 运行 `重新生成 '.ssh/authorized_keys' 文件(警告:不是 Gitea 的密钥也会被删除)``重新生成所有仓库的 Update 钩子(用于自定义配置文件被修改)`

View file

@ -0,0 +1,26 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "從 Gogs 升級"
slug: "upgrade-from-gogs"
weight: 10
toc: true
draft: false
menu:
sidebar:
parent: "upgrade"
name: "從 Gogs 升級"
weight: 10
identifier: "upgrade-from-gogs"
---
# 從 Gogs 升級
假如您正在運行 Gogs 0.9.146 以下版本,你可以很平順的升級到 Gitea請參考底下升級步驟
* 停止 Gogs 服務。
* 複製 Gogs 設定檔 `custom/conf/app.ini` 到 Gitea 相對應位置。
* 複製 Gogs `conf/` 目錄到 Gitea `options/` 目錄。
* 假如您還有更多自訂的檔案在 `custom/` 目錄,像是多國語系檔案或模板,你應該手動將設定轉移到 Gitea 上,因為這些檔案在 Gitea 上有些不同。
* 複製 `data/` 目錄到 Gitea 相對應目錄,此目錄包含 issue 附件檔及頭像。
* 啟動 Gitea 服務
* 進入 Gitea 管理介面,執行 `重新產生 '.ssh/authorized_keys' 檔案` (警告: 非 Gitea 金鑰將被刪除) 和 `重新產生全部倉庫 update hook` (當自訂設定檔已經被修改,則需要此步驟)。