aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon Delmar Davis <don@suspectdevices.com>2021-01-04 10:00:25 -0800
committerDon Delmar Davis <don@suspectdevices.com>2021-01-04 10:00:25 -0800
commit333fbbbd00e664efd07b862833478f31bc2ac086 (patch)
tree28036a32c87eefd49f3e169fad9650c80decceaf
parent4153ffd50376a0741c1038493abf506dde618743 (diff)
...
-rw-r--r--README.md24
-rw-r--r--app.ini8
2 files changed, 28 insertions, 4 deletions
diff --git a/README.md b/README.md
index 12e3f43..77747ab 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,30 @@ postgres@shelly:~$ createdb gitea -O git
Once gitea is installed go to myservername:3000 and navigate to the login in the upper right corner. Fill in the database,username, and dbpassword. Replace localhost with your servers fqdn. Create admin user (remember password here)
## Testing it out.
+The first thing we want to do here is to mirror one of our github repositories (this one)
+### Mirroring Github Repositories.
+At some point we want to automate mirroring all of our repositories. For now we want to test it out. To do this we create a personal-access-token from our github developer tools. (save the token somewhere as it will not be recoverable). Once we have that token we select New migration. Fill in the https://github.com/myuser/myrepo and paste the token into the form, select mirror and the magic begins.
+
+### Editiing the mirror interval
+The default mirror interval is 8 hours with a minimum of 10 minutes.
+To fix this we add the following to /etc/gitea/app.ini
+
+```
+nano /etc/gitea.app.ini
+...
+[cron]
+ENABLED = true
+RUN_AT_START = true
+
+[cron.update_mirrors]
+SCHEDULE = @every 2m
+
+[mirror]
+DEFAULT_INTERVAL = 1h
+MIN_INTERVAL = 2m
+...
+service gitea restart
+```
diff --git a/app.ini b/app.ini
index be825fc..3bcde9e 100644
--- a/app.ini
+++ b/app.ini
@@ -15,8 +15,8 @@ DB_TYPE = postgres
HOST = 127.0.0.1:5432
NAME = gitea
USER = git
-PASSWD = W3r3N3ts
-SCHEMA =
+PASSWD = not_here
+SCHEMA =
SSL_MODE = disable
CHARSET = utf8
PATH = /var/lib/gitea/data/gitea.db
@@ -41,8 +41,8 @@ OFFLINE_MODE = false
ENABLED = true
HOST = localhost:53
FROM = Git Server <root@suspectdevices.com>
-USER =
-PASSWD =
+USER =
+PASSWD =
[service]
REGISTER_EMAIL_CONFIRM = false