Docs/Gitea.md
2022-06-14 15:58:20 +02:00

72 lines
1.7 KiB
Markdown

# Gitea
## Användning
### Generera SSH-nycklar
<code>ssh-keygen -t RSA -b 4096 -C "user@domain.se"</code>
## Installation
### Config cheat sheet
https://docs.gitea.io/en-us/config-cheat-sheet/#server-server
### Aktivera inbyggd SSH-server
<pre><code>[server]
START_SSH_SERVER = true
SSH_LISTEN_PORT = %(SSH_PORT)s
</code></pre>
### HTTPS proxy via Apache
<pre><code>[server]
ROOT_URL = https://git.myspace.nu/
</code></pre>
### Sätt repositories default till private
<pre><code>[repository]
DEFAULT_PRIVATE = private
</code></pre>
### Deaktivera signup & openid
<pre><code>[service]
DISABLE_REGISTRATION = true
[openid]
ENABLE_OPENID_SIGNIN = false
ENABLE_OPENID_SIGNUP = false
</code></pre>
### Kör som Windows service
<pre><code>[server]
<strike># echo %COMPUTERNAME% => USER-PC => RUN_USER = USER-PC$</strike>
<strike>RUN_USER = COMPUTERNAME$</strike>
# Använd git för att SSH-länkar till repositoryt ska presenteras rätt
RUN_USER = git
</code></pre>
<code>sc.exe create gitea start= auto binPath= "\"E:\Gitea\gitea.exe\" web --config \"E:\Gitea\custom\conf\app.ini\""</code>
### Uppdatera Gitea
Ladda ned den senaste versionen från https://dl.gitea.io/gitea/ till installationskatalogen och döp om den till gitea.exe Starta sedan om tjänsten.
<code>net stop gitea && get start gitea</code>
https://docs.gitea.io/en-us/upgrade-from-gitea/
### Avinstallera Windows service
<code>sc.exe delete gitea</code>
### Redigera mallar
* https://github.com/go-gitea/gitea/tree/main/templates (mallar)
* https://gitea.com/gitea/awesome-gitea#themes (teman)
* https://yourbasic.org/golang/format-parse-string-time-date-example/ (datumformat)
* https://docs.gitea.io/en-us/cmd-embedded/ (extrahera mallar och filer)