Docs/README.md
2022-02-21 11:29:07 +01:00

64 lines
1.5 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>
### 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)