« Gitea » : différence entre les versions
Apparence
Ligne 11 : | Ligne 11 : | ||
<kode lang='bash'> | <kode lang='bash'> | ||
# create a user to run Gitea | # create a user to run Gitea | ||
sudo adduser --system --group --disabled-password gitea | sudo adduser --system --group --disabled-password --shell /bin/bash gitea | ||
# create required directory structure | # create required directory structure |
Version du 16 octobre 2023 à 17:58
Install on Ubuntu
Database Preparation
create database gitea character set 'utf8mb4' collate 'utf8mb4_general_ci';
create user 'gitea'@'localhost' identified by '[PWD]';
grant all privileges on gitea.* to 'gitea'@'localhost';
flush privileges;
|
Installation from binary
# create a user to run Gitea
sudo adduser --system --group --disabled-password --shell /bin/bash gitea
# create required directory structure
sudo mkdir -p /var/lib/gitea/{custom,data,log}
sudo chown -R gitea:gitea /var/lib/gitea/
sudo chmod -R 750 /var/lib/gitea/
sudo mkdir /etc/gitea
sudo chown root:gitea /etc/gitea
sudo chmod 770 /etc/gitea
sudo mkdir /var/log/gitea
sudo chown gitea:gitea /var/log/gitea
sudo chmod 750 /var/log/gitea
# install the binary
wget https://dl.gitea.com/gitea/1.20.5/gitea-1.20.5-linux-arm64 -O gitea
sudo mv gitea /usr/local/bin
sudo chown root:root /usr/local/bin/gitea
sudo chmod 755 /usr/local/bin/gitea
|
Run as service
/etc/systemd/system/gitea.service |
Create an UFW application
Install
sc-start gitea |
- Open http://<server-name>:3000 to create the configuration file /etc/gitea/app.ini
- Change the log path to /var/log/gitea
Errors
fatal: protocol error: bad line length character
There is a problem on the server running the git-receive-pack process. Run the following command to get the inner error:
ssh gitea@[server] git-receive-pack [repo-path] |
This account is currently not available
The user gitea doesn’t have shell.