Compare commits

...

16 commits
next ... v1.19

Author SHA1 Message Date
crystal
147bc8f9a0 replace gna.org links with archive.org mirrors
gna.org is apparently gone

(cherry picked from commit 34ab587e0f)
2024-04-19 15:11:43 +00:00
crystal
078cae4fd2 replace gna.org source links with archive.org mirrors
the source for the upgrade page has been removed from the next branch

(cherry picked from commit 3c7b415a23)
2024-04-19 14:18:10 +00:00
Caesar Schinas
3325648672
move images to content dir and use relative paths
This is necessary for the website upgrade to Astro v3, which has a new built-in image API.
2023-08-31 01:09:52 +01:00
Caesar Schinas
8e5b73bdbc
fix: broken links from Gitea docs import
Invalid link templates left over from docs import from Gitea.

Closes https://codeberg.org/forgejo/website/issues/160

(cherry picked from commit c6ab3c37fb)

# Conflicts:
#	docs/user/packages/alpine.md
#	docs/user/packages/debian.md
#	docs/user/packages/swift.md
2023-08-19 21:14:46 +01:00
Caesar Schinas
43566f8fb6
move docs to subfolder 2023-08-15 00:20:36 +01:00
Caesar Schinas
de55917aa6
fix: remove h1-level headings in docs
Increases depth of markdown headings to avoid 1st-level headings

# Conflicts:
#	v1.20/admin/actions.md
#	v1.20/admin/installation.md
#	v1.20/admin/search-engines-indexation.md
#	v1.20/developer/DISCUSSIONS.md
#	v1.20/developer/from-source.md
#	v1.20/user/actions.md
#	v1.20/user/packages/swift.md
#	v1.20/user/project.md
#	v1.20/user/protection.md
#	v1.20/user/push-to-create.md
2023-08-13 17:09:05 +01:00
Caesar Schinas
983d4f45c1
refactor: use astro content collections for docs
Reviewed-on: https://codeberg.org/forgejo/website/pulls/323

# Conflicts:
#	v1.20/admin/actions.md
#	v1.20/admin/config-cheat-sheet.md
#	v1.20/admin/database-preparation.md
#	v1.20/admin/email-setup.md
#	v1.20/admin/incoming-email.md
#	v1.20/admin/index.md
#	v1.20/admin/installation.md
#	v1.20/admin/logging-documentation.md
#	v1.20/admin/recommendations.md
#	v1.20/admin/reverse-proxy.md
#	v1.20/admin/search-engines-indexation.md
#	v1.20/admin/seek-assistance.md
#	v1.20/admin/upgrade.md
#	v1.20/developer/COC.md
#	v1.20/developer/DCO.md
#	v1.20/developer/DISCUSSIONS.md
#	v1.20/developer/GOVERNANCE.md
#	v1.20/developer/RELEASE.md
#	v1.20/developer/SECRETS.md
#	v1.20/developer/WORKFLOW.md
#	v1.20/developer/code-forgejo-org.md
#	v1.20/developer/from-source.md
#	v1.20/developer/index.md
#	v1.20/developer/infrastructure.md
#	v1.20/index.md
#	v1.20/license.md
#	v1.20/user/actions.md
#	v1.20/user/agit-support.md
#	v1.20/user/api-usage.md
#	v1.20/user/authentication.md
#	v1.20/user/blocking-user.md
#	v1.20/user/email-settings.md
#	v1.20/user/first-repository.md
#	v1.20/user/index.md
#	v1.20/user/issue-pull-request-templates.md
#	v1.20/user/issue-tracking-basics.md
#	v1.20/user/labels.md
#	v1.20/user/linked-references.md
#	v1.20/user/merge-message-templates.md
#	v1.20/user/oauth2-provider.md
#	v1.20/user/packages/alpine.md
#	v1.20/user/packages/cargo.md
#	v1.20/user/packages/chef.md
#	v1.20/user/packages/composer.md
#	v1.20/user/packages/conan.md
#	v1.20/user/packages/conda.md
#	v1.20/user/packages/container.md
#	v1.20/user/packages/cran.md
#	v1.20/user/packages/debian.md
#	v1.20/user/packages/generic.md
#	v1.20/user/packages/go.md
#	v1.20/user/packages/helm.md
#	v1.20/user/packages/index.md
#	v1.20/user/packages/maven.md
#	v1.20/user/packages/npm.md
#	v1.20/user/packages/nuget.md
#	v1.20/user/packages/pub.md
#	v1.20/user/packages/pypi.md
#	v1.20/user/packages/rpm.md
#	v1.20/user/packages/rubygems.md
#	v1.20/user/packages/storage.md
#	v1.20/user/packages/swift.md
#	v1.20/user/packages/vagrant.md
#	v1.20/user/profile.md
#	v1.20/user/project.md
#	v1.20/user/protection.md
#	v1.20/user/push-to-create.md
#	v1.20/user/repo-permissions.md
#	v1.20/user/semver.md
#	v1.20/user/token-scope.md
#	v1.20/user/webhooks.md
#	v1.20/user/wiki.md
2023-08-13 17:07:22 +01:00
Cyborus
61790ebbd8
"loose" should be "lose"
# Conflicts:
#	v1.20/admin/upgrade.md
2023-08-13 17:00:14 +01:00
wackbyte
c6de19a213
chore: make all intra-site links not use a specific domain
# Conflicts:
#	v1.20/admin/installation.md
#	v1.20/developer/RELEASE.md
#	v1.20/index.md
2023-08-13 15:59:54 +01:00
wackbyte
7420a3daaf
docs: fix syntax error in example JSON returned from request
# Conflicts:
#	v1.20/user/api-usage.md
2023-08-13 15:57:45 +01:00
wackbyte
47553caeed
docs: use more positive examples for labels
# Conflicts:
#	v1.19/user/issue-tracking-basics.md
2023-08-13 15:56:22 +01:00
wackbyte
042a8a1039
docs: don't assume gender of subject
# Conflicts:
#	v1.19/user/repo-permissions.md
2023-08-13 15:56:22 +01:00
b76bd34220
replace ubuntu-latest with docker for clarity
# Conflicts:
#	v1.20/admin/actions.md
2023-08-13 14:14:21 +01:00
47d95bf7a4
docs: link to the v1.20 installation documentation in v1.19 2023-08-13 14:02:17 +01:00
Faustin Lammler
7fefb6c686
Forgejo support both MySQL and MariaDB
MariaDB is the default relational database on a number of Linux
distributions, it is important to show users that it's a perfectly
viable option for Forgejo installations.

# Conflicts:
#	v1.20/admin/command-line.md
#	v1.20/admin/config-cheat-sheet.md
#	v1.20/admin/database-preparation.md
2023-08-13 13:25:57 +01:00
Gusted
503c03678a
Run prettier (#196)
- Format according to prettier.

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/website/pulls/196
Reviewed-by: Loïc Dachary <dachary@noreply.codeberg.org>

# Conflicts:
#	v1.20/admin/config-cheat-sheet.md
#	v1.20/admin/database-preparation.md
#	v1.20/developer/code-forgejo-org.md
#	v1.20/index.md
#	v1.20/license.md
#	v1.20/user/api-usage.md
#	v1.20/user/authentication.md
#	v1.20/user/email-settings.md
#	v1.20/user/issue-pull-request-templates.md
#	v1.20/user/oauth2-provider.md
#	v1.20/user/packages/index.md
#	v1.20/user/packages/maven.md
#	v1.20/user/project.md
#	v1.20/user/protection.md
#	v1.20/user/semver.md
#	v1.20/user/wiki.md
2023-08-13 13:24:35 +01:00
75 changed files with 540 additions and 581 deletions

View file

@ -1,16 +0,0 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Forgejo v1.19 administrator guide'
---
These documents are targeted to people who run Forgejo on their machines.
- [Seek Assistance](seek-assistance)
- [Database Preparation](database-preparation)
- [Configuration Cheat Sheet](config-cheat-sheet)
- [Upgrade guide](upgrade)
- [Command Line](command-line)
- [Reverse Proxy](reverse-proxy)
- [Email setup](email-setup)
- [Incoming Email](incoming-email)
- [Logging Configuration](logging-documentation)

View file

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 121 KiB

View file

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View file

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View file

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View file

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 154 KiB

View file

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

View file

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View file

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View file

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View file

Before

Width:  |  Height:  |  Size: 201 KiB

After

Width:  |  Height:  |  Size: 201 KiB

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View file

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View file

Before

Width:  |  Height:  |  Size: 219 KiB

After

Width:  |  Height:  |  Size: 219 KiB

View file

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

View file

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View file

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View file

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Command Line'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/usage/command-line.en-us.md'
@ -365,7 +364,7 @@ This command is idempotent.
### convert
Converts an existing MySQL database from utf8 to utf8mb4.
Converts an existing MySQL/MariaDB database from utf8 to utf8mb4.
### doctor

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Configuration Cheat Sheet'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/69c9ab387f2db4eab29749480ca21206de75e77a/docs/content/doc/advanced/config-cheat-sheet.en-us.md'
@ -414,8 +413,8 @@ The following configuration set `Content-Type: application/vnd.android.package-a
- `SCHEMA`: **\<empty\>**: For PostgreSQL only, schema to use if different from "public". The schema must exist beforehand,
the user must have creation privileges on it, and the user search path must be set to the look into the schema first
(e.g. `ALTER USER user SET SEARCH_PATH = schema_name,"$user",public;`).
- `SSL_MODE`: **disable**: SSL/TLS encryption mode for connecting to the database. This option is only applied for PostgreSQL and MySQL.
- Valid values for MySQL:
- `SSL_MODE`: **disable**: SSL/TLS encryption mode for connecting to the database. This option is only applied for PostgreSQL and MySQL/MariaDB.
- Valid values for MySQL/MariaDB:
- `true`: Enable TLS with verification of the database server certificate against its root certificate. When selecting this option make sure that the root certificate required to validate the database server certificate (e.g. the CA certificate) is on the system certificate store of both the database and Forgejo servers. See your system documentation for instructions on how to add a CA certificate to the certificate store.
- `false`: Disable TLS.
- `disable`: Alias for `false`, for compatibility with PostgreSQL.
@ -429,14 +428,14 @@ The following configuration set `Content-Type: application/vnd.android.package-a
- `SQLITE_TIMEOUT`: **500**: Query timeout for SQLite3 only.
- `SQLITE_JOURNAL_MODE`: **""**: Change journal mode for SQlite3. Can be used to enable [WAL mode](https://www.sqlite.org/wal.html) when high load causes write congestion. See [SQlite3 docs](https://www.sqlite.org/pragma.html#pragma_journal_mode) for possible values. Defaults to the default for the database file, often DELETE.
- `ITERATE_BUFFER_SIZE`: **50**: Internal buffer size for iterating.
- `CHARSET`: **utf8mb4**: For MySQL only, either "utf8" or "utf8mb4". NOTICE: for "utf8mb4" you must use MySQL InnoDB > 5.6. Forgejo is unable to check this.
- `CHARSET`: **utf8mb4**: For MySQL/MariaDB only, either "utf8" or "utf8mb4". NOTICE: for "utf8mb4" you must use MySQL/MariaDB InnoDB > 5.6. Forgejo is unable to check this.
- `PATH`: **data/forgejo.db**: For SQLite3 only, the database file path.
- `LOG_SQL`: **true**: Log the executed SQL.
- `DB_RETRIES`: **10**: How many ORM init / DB connect attempts allowed.
- `DB_RETRY_BACKOFF`: **3s**: time.Duration to wait before trying another ORM init / DB connect attempt, if failure occurred.
- `MAX_OPEN_CONNS` **0**: Database maximum open connections - default is 0, meaning there is no limit.
- `MAX_IDLE_CONNS` **2**: Max idle database connections on connection pool, default is 2 - this will be capped to `MAX_OPEN_CONNS`.
- `CONN_MAX_LIFETIME` **0 or 3s**: Sets the maximum amount of time a DB connection may be reused - default is 0, meaning there is no limit (except on MySQL where it is 3s - see #6804 & #7071).
- `CONN_MAX_LIFETIME` **0 or 3s**: Sets the maximum amount of time a DB connection may be reused - default is 0, meaning there is no limit (except on MySQL/MariaDB where it is 3s - see #6804 & #7071).
- `AUTO_MIGRATION` **true**: Whether execute database models migrations automatically.
Please see #8540 & #8273 for further discussion of the appropriate values for `MAX_OPEN_CONNS`, `MAX_IDLE_CONNS` & `CONN_MAX_LIFETIME` and their
@ -866,9 +865,9 @@ Default templates for project boards:
- You must be very careful to ensure that this template does not throw errors or panics as this template runs outside of the panic/recovery script.
- `REQUEST_ID_HEADERS`: **\<empty\>**: You can configure multiple values that are splited by comma here. It will match in the order of configuration, and the first match will be finally printed in the access log.
- e.g.
- In the Request Header: X-Request-ID: **test-id-123**
- Configuration in app.ini: REQUEST_ID_HEADERS = X-Request-ID
- Print in log: 127.0.0.1:58384 - - [14/Feb/2023:16:33:51 +0800] "**test-id-123**" ...
- In the Request Header: X-Request-ID: **test-id-123**
- Configuration in app.ini: REQUEST_ID_HEADERS = X-Request-ID
- Print in log: 127.0.0.1:58384 - - [14/Feb/2023:16:33:51 +0800] "**test-id-123**" ...
### Log subsections (`log.name`, `log.name.*`)
@ -1344,7 +1343,7 @@ on:
- releases/*
jobs:
build:
runs-on: ubuntu-latest
runs-on: docker
steps:
- uses: actions/checkout@v3
```

View file

@ -1,163 +1,162 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Database Preparation'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/installation/database-preparation.en-us.md'
---
You need a database to use Forgejo. Forgejo supports PostgreSQL (>=10), MySQL (>=5.7), SQLite, and MSSQL (>=2008R2 SP3). This page will guide into preparing database. Only PostgreSQL and MySQL will be covered here since those database engines are widely-used in production.
You need a database to use Forgejo. Forgejo supports PostgreSQL (>=10), MySQL (>=5.7) or MariaDB (>=10.0), SQLite, and MSSQL (>=2008R2 SP3). This page will guide into preparing database. Only PostgreSQL and MySQL/MariaDB will be covered here since those database engines are widely-used in production.
Database instance can be on same machine as Forgejo (local database setup), or on different machine (remote database).
Note: All steps below requires that the database engine of your choice is installed on your system. For remote database setup, install the server application on database instance and client program on your Forgejo server. The client program is used to test connection to the database from Forgejo server, while Forgejo itself use database driver provided by Go to accomplish the same thing. In addition, make sure you use same engine version for both server and client for some engine features to work. For security reason, protect `root` (MySQL) or `postgres` (PostgreSQL) database superuser with secure password. The steps assumes that you run Linux for both database and Forgejo servers.
Note: All steps below requires that the database engine of your choice is installed on your system. For remote database setup, install the server application on database instance and client program on your Forgejo server. The client program is used to test connection to the database from Forgejo server, while Forgejo itself use database driver provided by Go to accomplish the same thing. In addition, make sure you use same engine version for both server and client for some engine features to work. For security reason, protect `root` (MySQL/MariaDB) or `postgres` (PostgreSQL) database superuser with secure password. The steps assumes that you run Linux for both database and Forgejo servers.
## MySQL
## MySQL/MariaDB
1. For remote database setup, you will need to make MySQL listen to your IP address. Edit `bind-address` option on `/etc/mysql/my.cnf` on database instance to:
1. For remote database setup, you will need to make MySQL/MariaDB listen to your IP address. Edit `bind-address` option on `/etc/mysql/my.cnf` on database instance to:
```ini
bind-address = 203.0.113.3
```
```ini
bind-address = 203.0.113.3
```
2. On database instance, login to database console as root:
```
mysql -u root -p
```
```
mysql -u root -p
```
Enter the password as prompted.
Enter the password as prompted.
3. Create database user which will be used by Forgejo, authenticated by password. This example uses `'forgejo'` as password. Please use a secure password for your instance.
For local database:
For local database:
```sql
SET old_passwords=0;
CREATE USER 'forgejo' IDENTIFIED BY 'forgejo';
```
```sql
SET old_passwords=0;
CREATE USER 'forgejo' IDENTIFIED BY 'forgejo';
```
For remote database:
For remote database:
```sql
SET old_passwords=0;
CREATE USER 'forgejo'@'192.0.2.10' IDENTIFIED BY 'forgejo';
```
```sql
SET old_passwords=0;
CREATE USER 'forgejo'@'192.0.2.10' IDENTIFIED BY 'forgejo';
```
where `192.0.2.10` is the IP address of your Forgejo instance.
where `192.0.2.10` is the IP address of your Forgejo instance.
Replace username and password above as appropriate.
Replace username and password above as appropriate.
4. Create database with UTF-8 charset and collation. Make sure to use `utf8mb4` charset instead of `utf8` as the former supports all Unicode characters (including emojis) beyond _Basic Multilingual Plane_. Also, collation chosen depending on your expected content. When in doubt, use either `unicode_ci` or `general_ci`.
```sql
CREATE DATABASE forgejodb CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci';
```
```sql
CREATE DATABASE forgejodb CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci';
```
Replace database name as appropriate.
Replace database name as appropriate.
5. Grant all privileges on the database to database user created above.
For local database:
For local database:
```sql
GRANT ALL PRIVILEGES ON forgejodb.* TO 'forgejo';
FLUSH PRIVILEGES;
```
```sql
GRANT ALL PRIVILEGES ON forgejodb.* TO 'forgejo';
FLUSH PRIVILEGES;
```
For remote database:
For remote database:
```sql
GRANT ALL PRIVILEGES ON forgejodb.* TO 'forgejo'@'192.0.2.10';
FLUSH PRIVILEGES;
```
```sql
GRANT ALL PRIVILEGES ON forgejodb.* TO 'forgejo'@'192.0.2.10';
FLUSH PRIVILEGES;
```
6. Quit from database console by `exit`.
7. On your Forgejo server, test connection to the database:
```
mysql -u forgejo -h 203.0.113.3 -p forgejodb
```
```
mysql -u forgejo -h 203.0.113.3 -p forgejodb
```
where `forgejo` is database username, `forgejodb` is database name, and `203.0.113.3` is IP address of database instance. Omit `-h` option for local database.
where `forgejo` is database username, `forgejodb` is database name, and `203.0.113.3` is IP address of database instance. Omit `-h` option for local database.
You should be connected to the database.
You should be connected to the database.
## PostgreSQL
1. For remote database setup, configure PostgreSQL on database instance to listen to your IP address by editing `listen_addresses` on `postgresql.conf` to:
```ini
listen_addresses = 'localhost, 203.0.113.3'
```
```ini
listen_addresses = 'localhost, 203.0.113.3'
```
2. PostgreSQL uses `md5` challenge-response encryption scheme for password authentication by default. Nowadays this scheme is not considered secure anymore. Use SCRAM-SHA-256 scheme instead by editing the `postgresql.conf` configuration file on the database server to:
```ini
password_encryption = scram-sha-256
```
```ini
password_encryption = scram-sha-256
```
Restart PostgreSQL to apply the setting.
Restart PostgreSQL to apply the setting.
3. On the database server, login to the database console as superuser:
```
su -c "psql" - postgres
```
```
su -c "psql" - postgres
```
4. Create database user (role in PostgreSQL terms) with login privilege and password. Please use a secure, strong password instead of `'forgejo'` below:
```sql
CREATE ROLE forgejo WITH LOGIN PASSWORD 'forgejo';
```
```sql
CREATE ROLE forgejo WITH LOGIN PASSWORD 'forgejo';
```
Replace username and password as appropriate.
Replace username and password as appropriate.
5. Create database with UTF-8 charset and owned by the database user created earlier. Any `libc` collations can be specified with `LC_COLLATE` and `LC_CTYPE` parameter, depending on expected content:
```sql
CREATE DATABASE forgejodb WITH OWNER forgejo TEMPLATE template0 ENCODING UTF8 LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8';
```
```sql
CREATE DATABASE forgejodb WITH OWNER forgejo TEMPLATE template0 ENCODING UTF8 LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8';
```
Replace database name as appropriate.
Replace database name as appropriate.
6. Allow the database user to access the database created above by adding the following authentication rule to `pg_hba.conf`.
For local database:
For local database:
```ini
local forgejodb forgejo scram-sha-256
```
```ini
local forgejodb forgejo scram-sha-256
```
For remote database:
For remote database:
```ini
host forgejodb forgejo 192.0.2.10/32 scram-sha-256
```
```ini
host forgejodb forgejo 192.0.2.10/32 scram-sha-256
```
Replace database name, user, and IP address of Forgejo instance with your own.
Replace database name, user, and IP address of Forgejo instance with your own.
Note: rules on `pg_hba.conf` are evaluated sequentially, that is the first matching rule will be used for authentication. Your PostgreSQL installation may come with generic authentication rules that match all users and databases. You may need to place the rules presented here above such generic rules if it is the case.
Note: rules on `pg_hba.conf` are evaluated sequentially, that is the first matching rule will be used for authentication. Your PostgreSQL installation may come with generic authentication rules that match all users and databases. You may need to place the rules presented here above such generic rules if it is the case.
Restart PostgreSQL to apply new authentication rules.
Restart PostgreSQL to apply new authentication rules.
7. On your Forgejo server, test connection to the database.
For local database:
For local database:
```
psql -U forgejo -d forgejodb
```
```
psql -U forgejo -d forgejodb
```
For remote database:
For remote database:
```
psql "postgres://forgejo@203.0.113.3/forgejodb"
```
```
psql "postgres://forgejo@203.0.113.3/forgejodb"
```
where `forgejo` is database user, `forgejodb` is database name, and `203.0.113.3` is IP address of your database instance.
where `forgejo` is database user, `forgejodb` is database name, and `203.0.113.3` is IP address of your database instance.
You should be prompted to enter password for the database user, and connected to the database.
You should be prompted to enter password for the database user, and connected to the database.
## Database Connection over TLS
@ -176,116 +175,116 @@ The PostgreSQL driver used by Forgejo supports two-way TLS. In two-way TLS, both
1. On the server with the database instance, place the following credentials:
- `/path/to/postgresql.crt`: Database instance certificate
- `/path/to/postgresql.key`: Database instance private key
- `/path/to/root.crt`: CA certificate chain to validate client certificates
- `/path/to/postgresql.crt`: Database instance certificate
- `/path/to/postgresql.key`: Database instance private key
- `/path/to/root.crt`: CA certificate chain to validate client certificates
2. Add following options to `postgresql.conf`:
```ini
ssl = on
ssl_ca_file = '/path/to/root.crt'
ssl_cert_file = '/path/to/postgresql.crt'
ssl_key_file = '/path/to/postgresql.key'
ssl_min_protocol_version = 'TLSv1.2'
```
```ini
ssl = on
ssl_ca_file = '/path/to/root.crt'
ssl_cert_file = '/path/to/postgresql.crt'
ssl_key_file = '/path/to/postgresql.key'
ssl_min_protocol_version = 'TLSv1.2'
```
3. Adjust credentials ownership and permission, as required by PostgreSQL:
```
chown postgres:postgres /path/to/root.crt /path/to/postgresql.crt /path/to/postgresql.key
chmod 0600 /path/to/root.crt /path/to/postgresql.crt /path/to/postgresql.key
```
```
chown postgres:postgres /path/to/root.crt /path/to/postgresql.crt /path/to/postgresql.key
chmod 0600 /path/to/root.crt /path/to/postgresql.crt /path/to/postgresql.key
```
4. Edit `pg_hba.conf` rule to only allow Forgejo database user to connect over SSL, and to require client certificate verification.
For PostgreSQL 12:
For PostgreSQL 12:
```ini
hostssl forgejodb forgejo 192.0.2.10/32 scram-sha-256 clientcert=verify-full
```
```ini
hostssl forgejodb forgejo 192.0.2.10/32 scram-sha-256 clientcert=verify-full
```
For PostgreSQL 11 and earlier:
For PostgreSQL 11 and earlier:
```ini
hostssl forgejodb forgejo 192.0.2.10/32 scram-sha-256 clientcert=1
```
```ini
hostssl forgejodb forgejo 192.0.2.10/32 scram-sha-256 clientcert=1
```
Replace database name, user, and IP address of Forgejo instance as appropriate.
Replace database name, user, and IP address of Forgejo instance as appropriate.
5. Restart PostgreSQL to apply configurations above.
6. On the server running the Forgejo instance, place the following credentials under the home directory of the user who runs Forgejo (e.g. `git`):
- `~/.postgresql/postgresql.crt`: Database client certificate
- `~/.postgresql/postgresql.key`: Database client private key
- `~/.postgresql/root.crt`: CA certificate chain to validate server certificate
- `~/.postgresql/postgresql.crt`: Database client certificate
- `~/.postgresql/postgresql.key`: Database client private key
- `~/.postgresql/root.crt`: CA certificate chain to validate server certificate
Note: Those file names above are hardcoded in PostgreSQL and it is not possible to change them.
Note: Those file names above are hardcoded in PostgreSQL and it is not possible to change them.
7. Adjust credentials, ownership and permission as required:
```
chown git:git ~/.postgresql/postgresql.crt ~/.postgresql/postgresql.key ~/.postgresql/root.crt
chown 0600 ~/.postgresql/postgresql.crt ~/.postgresql/postgresql.key ~/.postgresql/root.crt
```
```
chown git:git ~/.postgresql/postgresql.crt ~/.postgresql/postgresql.key ~/.postgresql/root.crt
chown 0600 ~/.postgresql/postgresql.crt ~/.postgresql/postgresql.key ~/.postgresql/root.crt
```
8. Test the connection to the database:
```
psql "postgres://forgejo@example.db/forgejodb?sslmode=verify-full"
```
```
psql "postgres://forgejo@example.db/forgejodb?sslmode=verify-full"
```
You should be prompted to enter password for the database user, and then be connected to the database.
You should be prompted to enter password for the database user, and then be connected to the database.
### MySQL
### MySQL/MariaDB
While the MySQL driver used by Forgejo also supports two-way TLS, Forgejo currently supports only one-way TLS. See the "Add TLS File Path Options for MySQL Database Connection](https://github.com/go-gitea/gitea/issues/10828)" issue for details.
While the MySQL/MariaDB driver used by Forgejo also supports two-way TLS, Forgejo currently supports only one-way TLS. See the "Add TLS File Path Options for MySQL/MariaDB Database Connection](https://github.com/go-gitea/gitea/issues/10828)" issue for details.
In one-way TLS, the database client verifies the certificate sent from server during the connection handshake, and the server assumes that the connected client is legitimate, since client certificate verification doesn't take place.
1. On the database instance, place the following credentials:
- `/path/to/mysql.crt`: Database instance certificate
- `/path/to/mysql.key`: Database instance key
- `/path/to/ca.crt`: CA certificate chain. This file isn't used on one-way TLS, but is used to validate client certificates on two-way TLS.
- `/path/to/mysql.crt`: Database instance certificate
- `/path/to/mysql.key`: Database instance key
- `/path/to/ca.crt`: CA certificate chain. This file isn't used on one-way TLS, but is used to validate client certificates on two-way TLS.
2. Add following options to `my.cnf`:
```ini
[mysqld]
ssl-ca = /path/to/ca.crt
ssl-cert = /path/to/mysql.crt
ssl-key = /path/to/mysql.key
tls-version = TLSv1.2,TLSv1.3
```
```ini
[mysqld]
ssl-ca = /path/to/ca.crt
ssl-cert = /path/to/mysql.crt
ssl-key = /path/to/mysql.key
tls-version = TLSv1.2,TLSv1.3
```
3. Adjust credentials ownership and permission:
```
chown mysql:mysql /path/to/ca.crt /path/to/mysql.crt /path/to/mysql.key
chmod 0600 /path/to/ca.crt /path/to/mysql.crt /path/to/mysql.key
```
```
chown mysql:mysql /path/to/ca.crt /path/to/mysql.crt /path/to/mysql.key
chmod 0600 /path/to/ca.crt /path/to/mysql.crt /path/to/mysql.key
```
4. Restart MySQL to apply the setting.
4. Restart MySQL/MariaDB to apply the setting.
5. The database user for Forgejo may have been created earlier, but it would authenticate only against the IP addresses of the server running Forgejo. To authenticate against its domain name, recreate the user, and this time also set it to require TLS for connecting to the database:
```sql
DROP USER 'forgejo'@'192.0.2.10';
CREATE USER 'forgejo'@'example.forgejo' IDENTIFIED BY 'forgejo' REQUIRE SSL;
GRANT ALL PRIVILEGES ON forgejodb.* TO 'forgejo'@'example.forgejo';
FLUSH PRIVILEGES;
```
```sql
DROP USER 'forgejo'@'192.0.2.10';
CREATE USER 'forgejo'@'example.forgejo' IDENTIFIED BY 'forgejo' REQUIRE SSL;
GRANT ALL PRIVILEGES ON forgejodb.* TO 'forgejo'@'example.forgejo';
FLUSH PRIVILEGES;
```
Replace database user name, password, and Forgejo instance domain as appropriate.
Replace database user name, password, and Forgejo instance domain as appropriate.
6. Make sure that the CA certificate chain required to validate the database server certificate is on the system certificate store of both the database and Forgejo servers. Consult your system documentation for instructions on adding a CA certificate to the certificate store.
7. On the server running Forgejo, test connection to the database:
```
mysql -u forgejo -h example.db -p --ssl
```
```
mysql -u forgejo -h example.db -p --ssl
```
You should be connected to the database.
You should be connected to the database.

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Email setup'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/usage/email-setup.en-us.md'

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Incoming Email'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/usage/incoming-email.en-us.md'

16
docs/admin/index.md Normal file
View file

@ -0,0 +1,16 @@
---
title: 'Forgejo v1.19 administrator guide'
---
These documents are targeted to people who run Forgejo on their machines.
- [Seek Assistance](./seek-assistance/)
- [Installation](../../v1.20/admin/installation/)
- [Database Preparation](./database-preparation/)
- [Configuration Cheat Sheet](./config-cheat-sheet/)
- [Upgrade guide](./upgrade/)
- [Command Line](./command-line/)
- [Reverse Proxy](./reverse-proxy/)
- [Email setup](./email-setup/)
- [Incoming Email](./incoming-email/)
- [Logging Configuration](./logging-documentation/)

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Logging Configuration'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/advanced/logging-documentation.en-us.md'

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Reverse proxy'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/features/authentication.en-us.md'

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Seek Assistance'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/help/seek-help.en-us.md'

View file

@ -1,8 +1,7 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Upgrade guide'
license: 'CC-BY-SA-4.0'
origin_url: 'https://forgejo.gna.org/Hostea/admin-guide/src/branch/master/README.md'
origin_url: 'https://web.archive.org/web/20240310104438/https://forgejo.gna.org/Hostea/admin-guide/src/branch/master/README.md'
---
This guide helps Forgejo admins perform upgrades safely and provides guidance to troubleshoot problems. It covers upgrades from Gitea back to version 1.2.0.
@ -24,7 +23,7 @@ In the simplest case where everything is on a single file system and if the inst
### Verify Forgejo works
It is **critical** to verify that Forgejo works very carefully. Restoring the backup done before the upgrade is easy and does not loose any information. But if a problem is discovered days or weeks after the upgrade, it will not be an option and fixing it on a live Forgejo instance will be much more challenging.
It is **critical** to verify that Forgejo works very carefully. Restoring the backup done before the upgrade is easy and does not lose any information. But if a problem is discovered days or weeks after the upgrade, it will not be an option and fixing it on a live Forgejo instance will be much more challenging.
- Run `forgejo doctor --all --log-file /tmp/doctor.log` and make sure it does not report any problem.
- Manually verify via the web interface. Making a checklist of a typical use case is a good way to not miss anything.
@ -79,7 +78,7 @@ The database version is stored in the database and can be retrieved with **selec
#### When upgrading from a specific version...
- Any version before [Gitea 1.17](https://github.com/go-gitea/gitea/releases/tag/v1.17.4)
- preserve a custom gitconfig: [episode 1](https://gna.org/blog/1-17-breaking-episode-1/), [episode 2](https://gna.org/blog/1-17-breaking-episode-2/)
- preserve a custom gitconfig: [episode 1](https://web.archive.org/web/20240313092747/https://gna.org/blog/1-17-breaking-episode-1/), [episode 2](https://web.archive.org/web/20240313092759/https://gna.org/blog/1-17-breaking-episode-2/)
- [Gitea 1.13.0](https://blog.gitea.io/2020/12/gitea-1.13.0-is-released/)
- The Webhook shared secret inside the webhook payload has been deprecated and will be removed in 1.14.0: https://github.com/go-gitea/gitea/issues/11755 please use the secret header that uses an hmac signature to validate the webhook payload.
- Git hooks now default to `off`! ([#13058](https://github.com/go-gitea/gitea/pull/13058))
@ -102,7 +101,7 @@ The database version is stored in the database and can be retrieved with **selec
### Versions with known issues
Gogs from before September 2015 migrated to Forgejo v1.18 may have a [dangling `pull_repo` table](https://forum.gna.org/t/73) and the corresponding pull requests will be removed by `gitea doctor --fix --all`.
Gogs from before September 2015 migrated to Forgejo v1.18 may have a [dangling `pull_repo` table](https://web.archive.org/web/20230207122019/https://forum.gna.org/t/gitea-upgrade-from-gogs-to-1-16-8-unmigrated-pull-repo-table/73) and the corresponding pull requests will be removed by `gitea doctor --fix --all`.
[From the 1.11.3 release notes](https://blog.gitea.io/2020/03/gitea-1.11.3-and-1.10.6-released/):

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: code.forgejo.org
license: 'CC-BY-SA-4.0'
---
@ -7,16 +6,16 @@ license: 'CC-BY-SA-4.0'
https://code.forgejo.org is a Forgejo instance running the latest stable
version. It is dedicated to hosting the following repositories:
* Default Forgejo Runner actions https://code.forgejo.org/actions
* Forgejo Runner https://code.forgejo.org/forgejo/runner
* [ACT](https://github.com/nektos/act) soft fork https://code.forgejo.org/forgejo/act
* [Infrastructure as code](https://enough-community.readthedocs.io) used to deploy code.forgejo.org https://code.forgejo.org/forgejo/infrastructure
* [Infrastructure as code](https://enough-community.readthedocs.io) secrets in a private repository
- Default Forgejo Runner actions https://code.forgejo.org/actions
- Forgejo Runner https://code.forgejo.org/forgejo/runner
- [ACT](https://github.com/nektos/act) soft fork https://code.forgejo.org/forgejo/act
- [Infrastructure as code](https://enough-community.readthedocs.io) used to deploy code.forgejo.org https://code.forgejo.org/forgejo/infrastructure
- [Infrastructure as code](https://enough-community.readthedocs.io) secrets in a private repository
To make these repositories easier to find, the following push mirrors are in place:
* https://code.forgejo.org/forgejo/runner => https://codeberg.org/forgejo/runner
* https://code.forgejo.org/forgejo/act => https://codeberg.org/forgejo/act
- https://code.forgejo.org/forgejo/runner => https://codeberg.org/forgejo/runner
- https://code.forgejo.org/forgejo/act => https://codeberg.org/forgejo/act
## Infrastructure

View file

@ -1,9 +1,8 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Forgejo v1.19 developer guide'
---
This area will be targeted to people who want to hack Forgejo and adjust it to
their needs.
- [code.forgejo.org](code-forgejo-org)
- [code.forgejo.org](./code-forgejo-org/)

11
docs/index.md Normal file
View file

@ -0,0 +1,11 @@
---
title: 'Forgejo v1.19 documentation'
---
- [What is Forgejo?](/)
- [Installation](/download/)
- [FAQ](/faq/)
- [Administrator guide](./admin/)
- [User guide](./user/)
- [Developer guide](./developer/)
- [License](./license/)

View file

@ -1,6 +1,5 @@
---
layout: '~/layouts/Markdown.astro'
title: "License"
title: 'License'
---
This documentation is licensed under [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.en).

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Agit Setup'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/usage/agit-support.en-us.md'

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'API Usage'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/developers/api-usage.en-us.md'
@ -31,13 +30,13 @@ $ curl -H "Content-Type: application/json" -d '{"name":"test"}' -u username:pass
{"id":1,"name":"test","sha1":"9fcb1158165773dd010fca5f0cf7174316c3e37d","token_last_eight":"16c3e37d"}
```
The ``sha1`` (the token) is only returned once and is not stored in
plain-text. It will not be displayed when listing tokens with a `GET`
The `sha1` (the token) is only returned once and is not stored in
plain-text. It will not be displayed when listing tokens with a `GET`
request; e.g.
```sh
$ curl --url https://yourusername:password@forgejo.your.host/api/v1/users/<username>/tokens
[{"name":"test","sha1":"","token_last_eight:"........":},{"name":"dev","sha1":"","token_last_eight":"........"}]
[{"name":"test","sha1":"","token_last_eight":"........"},{"name":"dev","sha1":"","token_last_eight":"........"}]
```
To use the API with basic authentication with two factor authentication

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Authentication'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/features/authentication.en-us.md'
@ -154,47 +153,50 @@ Uses the following fields:
## PAM (Pluggable Authentication Module)
This procedure enables PAM authentication. Users may still be added to the
system manually using the user administration. PAM provides a mechanism to
This procedure enables PAM authentication. Users may still be added to the
system manually using the user administration. PAM provides a mechanism to
automatically add users to the current database by testing them against PAM
authentication. To work with normal Linux passwords, the user running Forgejo
authentication. To work with normal Linux passwords, the user running Forgejo
must also have read access to `/etc/shadow` in order to check the validity of
the account when logging in using a public key.
**Note**: If a user has added SSH public keys into Forgejo, the use of these
keys _may_ bypass the login check system. Therefore, if you wish to disable a user who
keys _may_ bypass the login check system. Therefore, if you wish to disable a user who
authenticates with PAM, you _should_ also manually disable the account in Forgejo using the
built-in user manager.
1. Configure and prepare the installation.
- It is recommended that you create an administrative user.
- Deselecting automatic sign-up may also be desired.
- It is recommended that you create an administrative user.
- Deselecting automatic sign-up may also be desired.
1. Once the database has been initialized, log in as the newly created
administrative user.
administrative user.
1. Navigate to the user setting (icon in top-right corner), and select
`Site Administration` -> `Authentication Sources`, and select
`Add Authentication Source`.
`Site Administration` -> `Authentication Sources`, and select
`Add Authentication Source`.
1. Fill out the field as follows:
- `Authentication Type` : `PAM`
- `Name` : Any value should be valid here, use "System Authentication" if
you'd like.
- `PAM Service Name` : Select the appropriate file listed under `/etc/pam.d/`
that performs the authentication desired.[^1]
- `PAM Email Domain` : The e-mail suffix to append to user authentication.
For example, if the login system expects a user called `gituser`, and this
field is set to `mail.com`, then Forgejo will expect the `user email` field
for an authenticated GIT instance to be `gituser@mail.com`.[^2]
- `Authentication Type` : `PAM`
- `Name` : Any value should be valid here, use "System Authentication" if
you'd like.
- `PAM Service Name` : Select the appropriate file listed under `/etc/pam.d/`
that performs the authentication desired.[^1]
- `PAM Email Domain` : The e-mail suffix to append to user authentication.
For example, if the login system expects a user called `gituser`, and this
field is set to `mail.com`, then Forgejo will expect the `user email` field
for an authenticated GIT instance to be `gituser@mail.com`.[^2]
**Note**: PAM support is added via build-time flags (TAGS="pam" make build),
and the official binaries provided do not have this enabled. PAM requires that
and the official binaries provided do not have this enabled. PAM requires that
the necessary libpam dynamic library be available and the necessary PAM
development headers be accessible to the compiler.
[^1]: For example, using standard Linux log-in on Debian "Bullseye" use
`common-session-noninteractive` - this value may be valid for other flavors of
Debian including Ubuntu and Mint, consult your distribution's documentation.
[^2]: **This is a required field for PAM**. Be aware: In the above example, the
user will log into the Forgejo web interface as `gituser` and not `gituser@mail.com`
[^1]:
For example, using standard Linux log-in on Debian "Bullseye" use
`common-session-noninteractive` - this value may be valid for other flavors of
Debian including Ubuntu and Mint, consult your distribution's documentation.
[^2]:
**This is a required field for PAM**. Be aware: In the above example, the
user will log into the Forgejo web interface as `gituser` and not `gituser@mail.com`
## FreeIPA

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Email Settings'
license: 'CC-BY-SA-4.0'
origin_url: 'https://codeberg.org/Codeberg/Documentation/src/commit/ceec82002bbdc62cf27974e84df51369a4bfe0f9/content/getting-started/email-settings.md'
@ -15,11 +14,11 @@ You can access it by clicking on the menu button “Profile and Settings...” i
In the section “Manage Email Addresses”, you can select one of the following options from the drop-down menu for each email address that you have registered with Forgejo:
| Option | Effect |
|:----------------------------|:---------------------------------------------------------------------------------------------------------------|
| Enable Email Notifications | Enables all notifications (default setting) |
| Only Email on Mention | Forgejo will only send an email to this address if your username is mentioned in an issue or a comment |
| Disable Email Notifications | Forgejo will not send any emails to this address |
| Option | Effect |
| :-------------------------- | :----------------------------------------------------------------------------------------------------- |
| Enable Email Notifications | Enables all notifications (default setting) |
| Only Email on Mention | Forgejo will only send an email to this address if your username is mentioned in an issue or a comment |
| Disable Email Notifications | Forgejo will not send any emails to this address |
When you're finished, press the button “Set Email Preference” to confirm your selection.
@ -28,12 +27,12 @@ When you're finished, press the button “Set Email Preference” to confirm you
## Issue notifications
As soon as you make a comment on an issue, you automatically subscribe to it. Unless you disabled email notifications for all your email addresses, you will get an email for every change and comment on that issue.
As soon as you make a comment on an issue, you automatically subscribe to it. Unless you disabled email notifications for all your email addresses, you will get an email for every change and comment on that issue.
You can check and modify your issue subscription status under the “Notifications” section on the menu on the right side of the issue screen.
## Watching repositories
When you watch a repository (by clicking on the “Watch” button in a repository), you will receive emails for every change (creation of issues, pull requests, comments, etc.) done in this repository.
When you watch a repository (by clicking on the “Watch” button in a repository), you will receive emails for every change (creation of issues, pull requests, comments, etc.) done in this repository.
To stop watching a repository, simply click on “Unwatch” in a repository.

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: Your First Repository
license: 'CC-BY-SA-4.0'
origin_url: 'https://codeberg.org/Codeberg/Documentation/src/commit/ceec82002bbdc62cf27974e84df51369a4bfe0f9/content/getting-started/first-repository.md'
@ -15,32 +14,32 @@ To create a new repository, you need be logged in to your account.
When you're logged in, you can use one of the two buttons shown in the two following screenshots to create a new repository:
![screenshot of the expanded menu in the upper right corner to create a new repository](../../../../images/v1.19/user/first-repository/create-repo.png)
![screenshot of the expanded menu in the upper right corner to create a new repository](../_images/user/first-repository/create-repo.png)
This will lead you to this page below.
![screenshot of new repository page](../../../../images/v1.19/user/first-repository/create-repo-2.png)
![screenshot of new repository page](../_images/user/first-repository/create-repo-2.png)
Here's an explanation of the form's fields:
- **Owner** Here, you can specify whether you want this to be your own personal project or whether you want it to be part of an organization that you're a part of
- **Repository name** A name for your repository (which will also be part of its path, in this case `https://codeberg.org/knut/foobar`)
- **Visibility** Repositories are either _public_ or _private_, where public means that everyone will be able to access your repository, while your private repositories can only be accessed by you and your collaborators (see [Invite Collaborators](/collaborating/invite-collaborators))
- **Visibility** Repositories are either _public_ or _private_, where public means that everyone will be able to access your repository, while your private repositories can only be accessed by you and your collaborators (see [Invite Collaborators](/collaborating/invite-collaborators/))
- **Description** A short description that appears next to your repository's name where appropriate
- **Template** Occasionally you may want to generate your repository from an existing template. In that case, you can specify that template here. Otherwise, simply leave this field empty.
- **Issue Labels** If you want to initialize your project's issue tracker with a set of labels that you can use to categorize issues, you can choose one here. You don't have to choose this right away though, as you can choose and modify issue labels at a later time as well.
- **.gitignore** A [.gitignore](https://git-scm.com/docs/gitignore) file defines which files Git should not keep track of. This is useful, for example to prevent configuration files or binaries to be tracked in version control. You can choose to add a pre-defined file matching the programming language you use now, or add one manually later.
- **License** Here, you can choose from a list of FSF/OSI approved licenses. A `LICENSE` file will then be added to the repository. For some help on choosing the correct license, have a look at our [licensing article](/getting-started/licensing).
- **README** is the first file one should read when accessing a repository. It's also the first file displayed when accessing a repository, a bit like the "homepage" of your repository. On Forgejo, this is interpreted as a [Markdown](/markdown) file.
- **License** Here, you can choose from a list of FSF/OSI approved licenses. A `LICENSE` file will then be added to the repository. For some help on choosing the correct license, have a look at our [licensing article](/getting-started/licensing/).
- **README** is the first file one should read when accessing a repository. It's also the first file displayed when accessing a repository, a bit like the "homepage" of your repository. On Forgejo, this is interpreted as a [Markdown](/markdown/) file.
- **Initialize repository** In order to add the `LICENSE`, `README` and `.gitignore` files mentioned above to your new repository, make sure you tick this box.
- **Default branch** Using this field, you can choose how to name the default branch of your Git repository. We recommend you use the predefined default.
It's okay to only specify owner and repository name, if you want to get started quickly.
After filling out the fields, click the green "Create Repository" button on the bottom of the page.
You should now see a screen similar to the one below. If you haven't chosen to generate `LICENSE`, `README` and `.gitignore` the screen might show instructions instead, which will vanish after [your first commit](#making-your-first-commit).
You should now see a screen similar to the one below. If you haven't chosen to generate `LICENSE`, `README` and `.gitignore` the screen might show instructions instead, which will vanish after [your first commit](#making-your-first-commit/).
![screenshot showing a freshly baken repository](../../../../images/v1.19/user/first-repository/create-repo-3.png)
![screenshot showing a freshly baken repository](../_images/user/first-repository/create-repo-3.png)
Here's what the most important buttons do:
@ -49,7 +48,7 @@ Here's what the most important buttons do:
- **The Repository Tabs (3)** contain links to every important feature within this repository:
- **Code** lets you browse through all versions of this repository's code.
- **Issues** is a very important communication tool between the author, their users and their contributors. Think of it as part bug-tracker, part forum.
For more information on this, have a look at [The Basics of Issue Tracking](/getting-started/issue-tracking-basics)
For more information on this, have a look at [The Basics of Issue Tracking](/getting-started/issue-tracking-basics/)
- **Pull Requests** is where other users can ask the author to "pull" in code, from a fork into the author's program.
- **Releases** is a space where the author can upload finished versions of their program, e.g. binaries
- **Wiki** is a basic wiki feature built into Forgejo.
@ -63,7 +62,7 @@ After creating a new repository, as laid out in the previous section, you can no
In this guide, we'll focus on connecting to Forgejo via HTTP using Git on the command line, but note that there are multiple other ways to connect to Forgejo, as laid out in more detail in the articles:
- [Clone & Commit via CLI](/git/clone-commit-via-cli/) and
- [Clone & Commit via Web](/git/clone-commit-via-web)
- [Clone & Commit via Web](/git/clone-commit-via-web/)
> Although we use HTTP in this Getting Started guide, it is a good idea to setup SSH-based authentication once you feel confident to do so
@ -89,7 +88,7 @@ knut@iceberg:~/repositories$
To clone your newly created repository, execute `git clone` with the URL that is shown in your repository:
![screenshot of the two options to receive a clone URL for git](../../../../images/v1.19/user/first-repository/repo-url.png)
![screenshot of the two options to receive a clone URL for git](../_images/user/first-repository/repo-url.png)
```bash
knut@iceberg:~/repositories$ git clone https://codeberg.org/knut/foobar
@ -254,6 +253,6 @@ When connecting via HTTPS, Git will ask you for your username and password, whic
After refreshing the repository page, you should now see something similar to this:
![screenshot showing the updated README on Codeberg](../../../../images/v1.19/user/first-repository/hello-world.png)
![screenshot showing the updated README on Codeberg](../_images/user/first-repository/hello-world.png)
Congratulations - you've just made your first source code contribution on Forgejo!

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Forgejo v1.19 user guide'
---
@ -7,40 +6,40 @@ These documents are targeted to people who are using Forgejo but are not
involved in running it on their machines.
- Getting started
- [Your First Repository](first-repository)
- [The Basics of Issue Tracking](issue-tracking-basics)
- [Integrated Wiki](wiki)
- [Email Settings](email-settings)
- [Your First Repository](./first-repository/)
- [The Basics of Issue Tracking](./issue-tracking-basics/)
- [Integrated Wiki](./wiki/)
- [Email Settings](./email-settings/)
- Collaborating with Others
- [Projects / Kanban boards](project)
- [Projects / Kanban boards](./project/)
- [Pull requests and Git flow](https://docs.codeberg.org/collaborating/pull-requests-and-git-flow/)
- [Invite Collaborators](https://docs.codeberg.org/collaborating/invite-collaborators/)
- [Create and Manage an Organization](https://docs.codeberg.org/collaborating/create-organization/)
- [Repository Permissions](repo-permissions)
- [Repository Permissions](./repo-permissions/)
- [Resolve Conflicts](https://docs.codeberg.org/collaborating/resolve-conflicts/)
- [Citable Code](https://docs.codeberg.org/collaborating/citable-code/)
- [Labels](labels)
- [Automatically Linked References](linked-references)
- [Labels](./labels/)
- [Automatically Linked References](./linked-references/)
- Working with Git Repositories
- [Clone & Commit via Web](https://docs.codeberg.org/git/clone-commit-via-web/)
- [Tags and Releases](https://docs.codeberg.org/git/using-tags/)
- [Branch and tag protection](protection)
- [Branch and tag protection](./protection/)
- Advanced Usage
- [Issue and Pull Request Templates](issue-pull-request-templates)
- [Merge Message templates](merge-message-templates)
- [Issue and Pull Request Templates](./issue-pull-request-templates/)
- [Merge Message templates](./merge-message-templates/)
- [Generating an Access Token](https://docs.codeberg.org/advanced/access-token/)
- [Webhooks](webhooks)
- [Webhooks](./webhooks/)
- Authentication
- [LDAP, PAM, FreeIPA](authentication)
- [OAuth2, Scoped Tokens, Client Types](oauth2-provider)
- [Semantic version](semver)
- [API Usage](api-usage)
- [LDAP, PAM, FreeIPA](./authentication/)
- [OAuth2, Scoped Tokens, Client Types](./oauth2-provider/)
- [Semantic version](./semver/)
- [API Usage](./api-usage/)
- [API Reference](https://codeberg.org/api/swagger)
- [Migrating Repositories](https://docs.codeberg.org/advanced/migrating-repos/)
- [Push Options](push-options)
- [Push to create](push-to-create)
- [Agit setup](agit-support)
- [Packages](packages)
- [Push Options](./push-options/)
- [Push to create](./push-to-create/)
- [Agit setup](./agit-support/)
- [Packages](./packages/)
- See also
- [Codeberg guide on Git](https://docs.codeberg.org/git/)
- [Codeberg guide on Markdown](https://docs.codeberg.org/markdown/)

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Issue and Pull Request Templates'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/usage/issue-pull-request-templates.en-us.md'
@ -79,16 +78,13 @@ Inside the directory can be multiple markdown (`.md`) or yaml (`.yaml`/`.yml`) i
```md
---
name: "Template Name"
about: "This template is for testing!"
title: "[TEST] "
ref: "main"
name: 'Template Name'
about: 'This template is for testing!'
title: '[TEST] '
ref: 'main'
labels:
- bug
- "help needed"
- bug
- 'help needed'
---
This is the template!
@ -106,7 +102,7 @@ This example YAML configuration file defines an issue form using several inputs
```yaml
name: Bug Report
about: File a bug report
title: "[Bug]: "
title: '[Bug]: '
body:
- type: markdown
attributes:
@ -126,7 +122,7 @@ body:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
value: "A bug happened!"
value: 'A bug happened!'
validations:
required: true
- type: dropdown
@ -172,7 +168,7 @@ You can use a `markdown` element to display Markdown in your form that provides
Attributes:
| Key | Description | Required | Type | Default | Valid values |
|-------|--------------------------------------------------------------|----------|--------|---------|--------------|
| ----- | ------------------------------------------------------------ | -------- | ------ | ------- | ------------ |
| value | The text that is rendered. Markdown formatting is supported. | Required | String | - | - |
### Textarea
@ -181,18 +177,18 @@ You can use a `textarea` element to add a multi-line text field to your form. Co
Attributes:
| Key | Description | Required | Type | Default | Valid values |
|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|--------|--------------|---------------------------|
| label | A brief description of the expected user input, which is also displayed in the form. | Required | String | - | - |
| description | A description of the text area to provide context or guidance, which is displayed in the form. | Optional | String | Empty String | - |
| placeholder | A semi-opaque placeholder that renders in the text area when empty. | Optional | String | Empty String | - |
| value | Text that is pre-filled in the text area. | Optional | String | - | - |
| Key | Description | Required | Type | Default | Valid values |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------ | ------------ | --------------------------- |
| label | A brief description of the expected user input, which is also displayed in the form. | Required | String | - | - |
| description | A description of the text area to provide context or guidance, which is displayed in the form. | Optional | String | Empty String | - |
| placeholder | A semi-opaque placeholder that renders in the text area when empty. | Optional | String | Empty String | - |
| value | Text that is pre-filled in the text area. | Optional | String | - | - |
| render | If a value is provided, submitted text will be formatted into a codeblock. When this key is provided, the text area will not expand for file attachments or Markdown editing. | Optional | String | - | Languages known to Forgejo. |
Validations:
| Key | Description | Required | Type | Default | Valid values |
|----------|------------------------------------------------------|----------|---------|---------|--------------|
| -------- | ---------------------------------------------------- | -------- | ------- | ------- | ------------ |
| required | Prevents form submission until element is completed. | Optional | Boolean | false | - |
### Input
@ -202,7 +198,7 @@ You can use an `input` element to add a single-line text field to your form.
Attributes:
| Key | Description | Required | Type | Default | Valid values |
|-------------|--------------------------------------------------------------------------------------------|----------|--------|--------------|--------------|
| ----------- | ------------------------------------------------------------------------------------------ | -------- | ------ | ------------ | ------------ |
| label | A brief description of the expected user input, which is also displayed in the form. | Required | String | - | - |
| description | A description of the field to provide context or guidance, which is displayed in the form. | Optional | String | Empty String | - |
| placeholder | A semi-transparent placeholder that renders in the field when empty. | Optional | String | Empty String | - |
@ -211,7 +207,7 @@ Attributes:
Validations:
| Key | Description | Required | Type | Default | Valid values |
|-----------|--------------------------------------------------------------------------------------------------|----------|---------|---------|--------------------------------------------------------------------------|
| --------- | ------------------------------------------------------------------------------------------------ | -------- | ------- | ------- | ------------------------------------------------------------------------ |
| required | Prevents form submission until element is completed. | Optional | Boolean | false | - |
| is_number | Prevents form submission until element is filled with a number. | Optional | Boolean | false | - |
| regex | Prevents form submission until element is filled with a value that match the regular expression. | Optional | String | - | a [regular expression](https://en.wikipedia.org/wiki/Regular_expression) |
@ -223,7 +219,7 @@ You can use a `dropdown` element to add a dropdown menu in your form.
Attributes:
| Key | Description | Required | Type | Default | Valid values |
|-------------|-----------------------------------------------------------------------------------------------------|----------|--------------|--------------|--------------|
| ----------- | --------------------------------------------------------------------------------------------------- | -------- | ------------ | ------------ | ------------ |
| label | A brief description of the expected user input, which is displayed in the form. | Required | String | - | - |
| description | A description of the dropdown to provide extra context or guidance, which is displayed in the form. | Optional | String | Empty String | - |
| multiple | Determines if the user can select more than one option. | Optional | Boolean | false | - |
@ -232,7 +228,7 @@ Attributes:
Validations:
| Key | Description | Required | Type | Default | Valid values |
|----------|------------------------------------------------------|----------|---------|---------|--------------|
| -------- | ---------------------------------------------------- | -------- | ------- | ------- | ------------ |
| required | Prevents form submission until element is completed. | Optional | Boolean | false | - |
### Checkboxes
@ -242,7 +238,7 @@ You can use the `checkboxes` element to add a set of checkboxes to your form.
Attributes:
| Key | Description | Required | Type | Default | Valid values |
|-------------|-------------------------------------------------------------------------------------------------------|----------|--------|--------------|--------------|
| ----------- | ----------------------------------------------------------------------------------------------------- | -------- | ------ | ------------ | ------------ |
| label | A brief description of the expected user input, which is displayed in the form. | Required | String | - | - |
| description | A description of the set of checkboxes, which is displayed in the form. Supports Markdown formatting. | Optional | String | Empty String | - |
| options | An array of checkboxes that the user can select. For syntax, see below. | Required | Array | - | - |
@ -250,6 +246,6 @@ Attributes:
For each value in the options array, you can set the following keys.
| Key | Description | Required | Type | Default | Options |
|----------|------------------------------------------------------------------------------------------------------------------------------------------|----------|---------|---------|---------|
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- | ------- | ------- |
| label | The identifier for the option, which is displayed in the form. Markdown is supported for bold or italic text formatting, and hyperlinks. | Required | String | - | - |
| required | Prevents form submission until element is completed. | Optional | Boolean | false | - |

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'The Basics of Issue Tracking'
license: 'CC-BY-SA-4.0'
origin_url: 'https://codeberg.org/Codeberg/Documentation/src/commit/ceec82002bbdc62cf27974e84df51369a4bfe0f9/content/getting-started/issue-tracking-basics.md'
@ -12,7 +11,7 @@ direction, ask questions and much more.
### The Issue Tracker
![Issues list](../../../../images/v1.19/user/issue-tracking-basics/issues-list.png)
![Issues list](../_images/user/issue-tracking-basics/issues-list.png)
You can access the issue tracker of a project by clicking its "Issues" tab **(1)**.
@ -41,7 +40,7 @@ process of review, discussion and closure, which can be more or less strictly de
based on the project you're contributing to.
The first thing that might happen is that your issue is categorized using labels.
Your issue may be reviewed by the project's maintainer(s) and evaluated whether it, i.e., might be a duplicate or an invalid bug report.
Your issue may be reviewed by the project's maintainer(s) and evaluated whether it, i.e., is a bug report or feature request.
Then, depending on what type of issue it is, there might be additional questions
or a discussion and, if applicable, the implementation of a solution (or the rejection of

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Labels'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/a8e13e64da7f9dc6176365e6b9295981af5d81ea/docs/content/doc/usage/labels.en-us.md'
@ -11,7 +10,7 @@ You can use labels to classify issues and pull requests and to improve your over
For repositories, labels can be created by going to `Issues` and clicking on `Labels`.
![create a label](../../../../images/v1.19/user/labels/label-new.png)
![create a label](../_images/user/labels/label-new.png)
For organizations, you can define organization-wide labels that are shared with all organization repositories, including both already-existing repositories as well as newly created ones. Organization-wide labels can be created in the organization `Settings`.
@ -19,7 +18,7 @@ Labels have a mandatory name, a mandatory color, an optional description, and mu
When you create a repository, you can ensure certain labels exist by using the `Issue Labels` option. This option lists a number of available label sets that are configured globally on your instance. Its contained labels will all be created as well while creating the repository.
![list of labels](../../../../images/v1.19/user/labels/label-apply.png)
![list of labels](../_images/user/labels/label-apply.png)
When you create a repository, you can ensure certain labels exist by using the `Issue Labels` option. This option lists a number of available label sets that are configured globally on your instance. Its contained labels will all be created as well while creating the repository.
@ -27,7 +26,7 @@ When you create a repository, you can ensure certain labels exist by using the `
Scoped labels are used to ensure at most a single label with the same scope is assigned to an issue or pull request. For example, if labels `kind/bug` and `kind/enhancement` have the Exclusive option set, an issue can only be classified as a bug or an enhancement.
![list of labels](../../../../images/v1.19/user/labels/label-list.png)
![list of labels](../_images/user/labels/label-list.png)
A scoped label must contain `/` in its name (not at either end of the name). The scope of a label is determined based on the **last** `/`, so for example the scope of label `scope/subscope/item` is `scope/subscope`.

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Automatically Linked References in Issues, Pull Requests and Commit Messages'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/usage/linked-references.en-us.md'
@ -82,7 +81,7 @@ Sometimes a commit or pull request may fix or bring back a problem documented
in a particular issue. Forgejo supports closing and reopening the referenced
issues by preceding the reference with a particular _keyword_. Common keywords
include "closes", "fixes", "reopens", etc. This list can be
[customized]({{< ref "/doc/advanced/config-cheat-sheet.en-us.md" >}}) by the
[customized](../../admin/config-cheat-sheet/) by the
site administrator.
Example:

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Merge Message templates'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/usage/merge-message-templates.en-us.md'

View file

@ -0,0 +1,123 @@
---
title: 'OAuth2 provider'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/developers/oauth2-provider.en-us.md'
---
Forgejo supports acting as an OAuth2 provider to allow third party applications to access its resources with the user's consent.
## Endpoints
| Endpoint | URL |
| ------------------------ | ----------------------------------- |
| OpenID Connect Discovery | `/.well-known/openid-configuration` |
| Authorization Endpoint | `/login/oauth/authorize` |
| Access Token Endpoint | `/login/oauth/access_token` |
| OpenID Connect UserInfo | `/login/oauth/userinfo` |
| JSON Web Key Set | `/login/oauth/keys` |
## Supported OAuth2 Grants
At the moment Forgejo only supports the [**Authorization Code Grant**](https://tools.ietf.org/html/rfc6749#section-1.3.1) standard with additional support of the following extensions:
- [Proof Key for Code Exchange (PKCE)](https://tools.ietf.org/html/rfc7636)
- [OpenID Connect (OIDC)](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth)
To use the Authorization Code Grant as a third party application it is required to register a new application via the "Settings" (`/user/settings/applications`) section of the settings.
## Scoped Tokens
Forgejo supports the following scopes for tokens:
| Name | Description |
| ---------------------------------------- | -------------------------------------------------------------------------------------------- |
| **(no scope)** | Grants read-only access to public user profile and public repositories. |
| **repo** | Full control over all repositories. |
| &nbsp;&nbsp;&nbsp; **repo:status** | Grants read/write access to commit status in all repositories. |
| &nbsp;&nbsp;&nbsp; **public_repo** | Grants read/write access to public repositories only. |
| **admin:repo_hook** | Grants access to repository hooks of all repositories. This is included in the `repo` scope. |
| &nbsp;&nbsp;&nbsp; **write:repo_hook** | Grants read/write access to repository hooks |
| &nbsp;&nbsp;&nbsp; **read:repo_hook** | Grants read-only access to repository hooks |
| **admin:org** | Grants full access to organization settings |
| &nbsp;&nbsp;&nbsp; **write:org** | Grants read/write access to organization settings |
| &nbsp;&nbsp;&nbsp; **read:org** | Grants read-only access to organization settings |
| **admin:public_key** | Grants full access for managing public keys |
| &nbsp;&nbsp;&nbsp; **write:public_key** | Grant read/write access to public keys |
| &nbsp;&nbsp;&nbsp; **read:public_key** | Grant read-only access to public keys |
| **admin:org_hook** | Grants full access to organizational-level hooks |
| **notification** | Grants full access to notifications |
| **user** | Grants full access to user profile info |
| &nbsp;&nbsp;&nbsp; **read:user** | Grants read access to user's profile |
| &nbsp;&nbsp;&nbsp; **user:email** | Grants read access to user's email addresses |
| &nbsp;&nbsp;&nbsp; **user:follow** | Grants access to follow/un-follow a user |
| **delete_repo** | Grants access to delete repositories as an admin |
| **package** | Grants full access to hosted packages |
| &nbsp;&nbsp;&nbsp; **write:package** | Grants read/write access to packages |
| &nbsp;&nbsp;&nbsp; **read:package** | Grants read access to packages |
| &nbsp;&nbsp;&nbsp; **delete:package** | Grants delete access to packages |
| **admin:gpg_key** | Grants full access for managing GPG keys |
| &nbsp;&nbsp;&nbsp; **write:gpg_key** | Grants read/write access to GPG keys |
| &nbsp;&nbsp;&nbsp; **read:gpg_key** | Grants read-only access to GPG keys |
| **admin:application** | Grants full access to manage applications |
| &nbsp;&nbsp;&nbsp; **write:application** | Grants read/write access for managing applications |
| &nbsp;&nbsp;&nbsp; **read:application** | Grants read access for managing applications |
| **sudo** | Allows to perform actions as the site admin. |
## Client types
Forgejo supports both confidential and public client types, [as defined by RFC 6749](https://datatracker.ietf.org/doc/html/rfc6749#section-2.1).
For public clients, a redirect URI of a loopback IP address such as `http://127.0.0.1/` allows any port. Avoid using `localhost`, [as recommended by RFC 8252](https://datatracker.ietf.org/doc/html/rfc8252#section-8.3).
## Example
**Note:** This example does not use PKCE.
1. Redirect to user to the authorization endpoint in order to get their consent for accessing the resources:
```curl
https://[YOUR-FORGEJO-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI& response_type=code&state=STATE
```
The `CLIENT_ID` can be obtained by registering an application in the settings. The `STATE` is a random string that will be send back to your application after the user authorizes. The `state` parameter is optional but should be used to prevent CSRF attacks.
![Authorization Page](/authorize.png)
The user will now be asked to authorize your application. If they authorize it, the user will be redirected to the `REDIRECT_URL`, for example:
```curl
https://[REDIRECT_URI]?code=RETURNED_CODE&state=STATE
```
2. Using the provided `code` from the redirect, you can request a new application and refresh token. The access token endpoints accepts POST requests with `application/json` and `application/x-www-form-urlencoded` body, for example:
```curl
POST https://[YOUR-FORGEJO-URL]/login/oauth/access_token
```
```json
{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"code": "RETURNED_CODE",
"grant_type": "authorization_code",
"redirect_uri": "REDIRECT_URI"
}
```
Response:
```json
{
"access_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjIsInR0IjowLCJleHAiOjE1NTUxNzk5MTIsImlhdCI6MTU1NTE3NjMxMn0.0-iFsAwBtxuckA0sNZ6QpBQmywVPz129u75vOM7wPJecw5wqGyBkmstfJHAjEOqrAf_V5Z-1QYeCh_Cz4RiKug",
"token_type": "bearer",
"expires_in": 3600,
"refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjIsInR0IjoxLCJjbnQiOjEsImV4cCI6MTU1NzgwNDMxMiwiaWF0IjoxNTU1MTc2MzEyfQ.S_HZQBy4q9r5SEzNGNIoFClT43HPNDbUdHH-GYNYYdkRfft6XptJBkUQscZsGxOW975Yk6RbgtGvq1nkEcklOw"
}
```
The `CLIENT_SECRET` is the unique secret code generated for this application. Please note that the secret will only be visible after you created/registered the application with Forgejo and cannot be recovered. If you lose the secret you must regenerate the secret via the application's settings.
The `REDIRECT_URI` in the `access_token` request must match the `REDIRECT_URI` in the `authorize` request.
3. Use the `access_token` to make [API requests](../api-usage/) to access the user's resources.

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Cargo Packages Repository'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/packages/cargo.en-us.md'
@ -58,9 +57,9 @@ Add the credentials section to the credentials file located in the current users
token = "Bearer {token}"
```
| Parameter | Description |
| --------- | ----------------------------------------------------------------------------------------------- |
| `token` | Your [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) |
| Parameter | Description |
| --------- | ------------------------------------------------------------- |
| `token` | Your [personal access token](../../api-usage/#authentication) |
## Publish a package

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Chef Packages Repository'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/packages/chef.en-us.md'

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Composer Packages Repository'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/packages/composer.en-us.md'
@ -47,7 +46,7 @@ curl --user your_username:your_password_or_token \
https://forgejo.example.com/api/packages/testuser/composer?version=1.0.3
```
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password.
If you are using 2FA or OAuth use a [personal access token](../../api-usage/#authentication) instead of the password.
The server responds with the following HTTP Status codes.

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Conan Packages Repository'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/packages/conan.en-us.md'
@ -20,12 +19,12 @@ conan remote add {remote} https://forgejo.example.com/api/packages/{owner}/conan
conan user --remote {remote} --password {password} {username}
```
| Parameter | Description |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `remote` | The remote name. |
| `username` | Your Forgejo username. |
| `password` | Your Forgejo password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `owner` | The owner of the package. |
| Parameter | Description |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `remote` | The remote name. |
| `username` | Your Forgejo username. |
| `password` | Your Forgejo password. If you are using 2FA or OAuth use a [personal access token](../../api-usage/#authentication) instead of the password. |
| `owner` | The owner of the package. |
For example:

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Conda Packages Repository'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/packages/conda.en-us.md'

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Container Registry'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/packages/container.en-us.md'
@ -21,7 +20,7 @@ To push an image or if the image is in a private registry, you have to authentic
docker login forgejo.example.com
```
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password.
If you are using 2FA or OAuth use a [personal access token](../../api-usage/#authentication) instead of the password.
## Image naming convention

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Generic Packages Repository'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/packages/generic.en-us.md'
@ -9,7 +8,7 @@ Publish generic files, like release binaries or other output, for your user or o
## Authenticate to the package registry
To authenticate to the Package Registry, you need to provide [custom HTTP headers or use HTTP Basic authentication]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}).
To authenticate to the Package Registry, you need to provide [custom HTTP headers or use HTTP Basic authentication](../../api-usage/#authentication).
## Publish a package
@ -35,7 +34,7 @@ curl --user your_username:your_password_or_token \
https://forgejo.example.com/api/packages/testuser/generic/test_package/1.0.0/file.bin
```
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password.
If you are using 2FA or OAuth use a [personal access token](../../api-usage/#authentication) instead of the password.
The server reponds with the following HTTP Status codes.

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Helm Chart Registry'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/packages/helm.en-us.md'
@ -26,13 +25,13 @@ helm repo add --username {username} --password {password} {repo} https://forgej
helm cm-push ./{chart_file}.tgz {repo}
```
| Parameter | Description |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `username` | Your Forgejo username. |
| `password` | Your Forgejo password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `repo` | The name for the repository. |
| `chart_file` | The Helm Chart archive. |
| `owner` | The owner of the package. |
| Parameter | Description |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `username` | Your Forgejo username. |
| `password` | Your Forgejo password. If you are using 2FA or OAuth use a [personal access token](../../api-usage/#authentication) instead of the password. |
| `repo` | The name for the repository. |
| `chart_file` | The Helm Chart archive. |
| `owner` | The owner of the package. |
## Install a package

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Package Registry'
---
@ -7,23 +6,23 @@ title: 'Package Registry'
The following package managers are currently supported:
| Name | Language | Package client |
| ---- | -------- | -------------- |
| [Cargo](cargo) | Rust | `cargo` |
| [Chef](chef) | - | `knife` |
| [Composer](composer) | PHP | `composer` |
| [Conan](conan) | C++ | `conan` |
| [Conda](conda) | - | `conda` |
| [Container](container) | - | any OCI compliant client |
| [Generic](generic) | - | any HTTP client |
| [Helm](helm) | - | any HTTP client, `cm-push` |
| [Maven](maven) | Java | `mvn`, `gradle` |
| [npm](npm) | JavaScript | `npm`, `yarn`, `pnpm` |
| [NuGet](nuget) | .NET | `nuget` |
| [Pub](pub) | Dart | `dart`, `flutter` |
| [PyPI](pypi) | Python | `pip`, `twine` |
| [RubyGems](rubygems) | Ruby | `gem`, `Bundler` |
| [Vagrant](vagrant) | - | `vagrant` |
| Name | Language | Package client |
| ------------------------- | ---------- | -------------------------- |
| [Cargo](./cargo/) | Rust | `cargo` |
| [Chef](./chef/) | - | `knife` |
| [Composer](./composer/) | PHP | `composer` |
| [Conan](./conan/) | C++ | `conan` |
| [Conda](./conda/) | - | `conda` |
| [Container](./container/) | - | any OCI compliant client |
| [Generic](./generic/) | - | any HTTP client |
| [Helm](./helm/) | - | any HTTP client, `cm-push` |
| [Maven](./maven/) | Java | `mvn`, `gradle` |
| [npm](./npm/) | JavaScript | `npm`, `yarn`, `pnpm` |
| [NuGet](./nuget/) | .NET | `nuget` |
| [Pub](./pub/) | Dart | `dart`, `flutter` |
| [PyPI](./pypi/) | Python | `pip`, `twine` |
| [RubyGems](./rubygems/) | Ruby | `gem`, `Bundler` |
| [Vagrant](./vagrant/) | - | `vagrant` |
**The following paragraphs only apply if Packages are not globally disabled!**
@ -39,10 +38,10 @@ and shows a link to the repository on the package site (as well as a link to the
## Access Restrictions
| Package owner type | User | Organization |
|--------------------|------|--------------|
| Package owner type | User | Organization |
| ------------------ | ----------------------------------------------------------- | -------------------------------------------------------- |
| **read** access | public, if user is public too; otherwise for this user only | public, if org is public, otherwise for org members only |
| **write** access | owner only | org members with admin or write access to the org |
| **write** access | owner only | org members with admin or write access to the org |
N.B.: These access restrictions are subject to change, where more finegrained control will be added via a dedicated organization team permission.

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Maven Packages Repository'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/92d3e2a6f899347cfa47221d5b25cdcaf2cce486/docs/content/doc/packages/maven.en-us.md'
@ -55,10 +54,10 @@ Afterwards add the following sections to your project `pom.xml` file:
</distributionManagement>
```
| Parameter | Description |
| -------------- | ----------- |
| `access_token` | Your [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}). |
| `owner` | The owner of the package. |
| Parameter | Description |
| -------------- | -------------------------------------------------------------- |
| `access_token` | Your [personal access token](../../api-usage/#authentication). |
| `owner` | The owner of the package. |
### Gradle variant
@ -114,9 +113,9 @@ If you want to publish a prebuild package to the registry, you can use [`mvn dep
mvn deploy:deploy-file -Durl=https://forgejo.example.com/api/packages/{owner}/maven -DrepositoryId=forgejo -Dfile=/path/to/package.jar
```
| Parameter | Description |
| -------------- | ----------- |
| `owner` | The owner of the package. |
| Parameter | Description |
| --------- | ------------------------- |
| `owner` | The owner of the package. |
You cannot publish a package if a package of the same name and version already exists. You must delete the existing package first.

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'npm Packages Repository'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/packages/npm.en-us.md'
@ -24,11 +23,11 @@ npm config set {scope}:registry https://forgejo.example.com/api/packages/{owner}
npm config set -- '//forgejo.example.com/api/packages/{owner}/npm/:_authToken' "{token}"
```
| Parameter | Description |
| --------- | ------------------------------------------------------------------------------------------------ |
| `scope` | The scope of the packages. |
| `owner` | The owner of the package. |
| `token` | Your [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}). |
| Parameter | Description |
| --------- | -------------------------------------------------------------- |
| `scope` | The scope of the packages. |
| `owner` | The owner of the package. |
| `token` | Your [personal access token](../../api-usage/#authentication). |
For example:

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'NuGet Packages Repository'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/packages/nuget.en-us.md'
@ -21,12 +20,12 @@ To register the package registry you need to configure a new NuGet feed source:
dotnet nuget add source --name {source_name} --username {username} --password {password} https://forgejo.example.com/api/packages/{owner}/nuget/index.json
```
| Parameter | Description |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `source_name` | The desired source name. |
| `username` | Your Forgejo username. |
| `password` | Your Forgejo password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `owner` | The owner of the package. |
| Parameter | Description |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `source_name` | The desired source name. |
| `username` | Your Forgejo username. |
| `password` | Your Forgejo password. If you are using 2FA or OAuth use a [personal access token](../../api-usage/#authentication) instead of the password. |
| `owner` | The owner of the package. |
For example:
@ -34,7 +33,7 @@ For example:
dotnet nuget add source --name forgejo --username testuser --password password123 https://forgejo.example.com/api/packages/testuser/nuget/index.json
```
You can add the source without credentials and use the [`--api-key`](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push) parameter when publishing packages. In this case you need to provide a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}).
You can add the source without credentials and use the [`--api-key`](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push) parameter when publishing packages. In this case you need to provide a [personal access token](../../api-usage/#authentication).
## Publish a package

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Pub Packages Repository'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/packages/pub.en-us.md'
@ -25,7 +24,7 @@ dart pub token add https://forgejo.example.com/api/packages/{owner}/pub
| ----------- | ------------------------- |
| `owner` | The owner of the package. |
You need to provide your [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}).
You need to provide your [personal access token](../../api-usage/#authentication).
## Publish a package

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'PyPI Packages Repository'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/packages/pypi.en-us.md'
@ -25,11 +24,11 @@ username = {username}
password = {password}
```
| Placeholder | Description |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `owner` | The owner of the package. |
| `username` | Your Forgejo username. |
| `password` | Your Forgejo password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
| Placeholder | Description |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `owner` | The owner of the package. |
| `username` | Your Forgejo username. |
| `password` | Your Forgejo password. If you are using 2FA or OAuth use a [personal access token](../../api-usage/#authentication) instead of the password. |
## Publish a package

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'RubyGems Packages Repository'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/packages/rubygems.en-us.md'
@ -20,10 +19,10 @@ To register the package registry edit the `~/.gem/credentials` file and add:
https://forgejo.example.com/api/packages/{owner}/rubygems: Bearer {token}
```
| Parameter | Description |
| --------- | ------------------------------------------------------------------------------------------------ |
| `owner` | The owner of the package. |
| `token` | Your [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}). |
| Parameter | Description |
| --------- | -------------------------------------------------------------- |
| `owner` | The owner of the package. |
| `token` | Your [personal access token](../../api-usage/#authentication). |
For example:

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Storage'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/packages/storage.en-us.md'
@ -18,7 +17,7 @@ Whenever a package gets deleted only the references to the underlaying blobs are
The blobs get not removed at this moment, so they still require space on the filesystem.
When a new package gets uploaded the existing blobs may get referenced again.
These unreferenced blobs get deleted by a [clean up job]({{< relref "doc/advanced/config-cheat-sheet.en-us.md#cron---cleanup-expired-packages-croncleanup_packages" >}}).
These unreferenced blobs get deleted by a [clean up job](../../../admin/config-cheat-sheet/#cron---cleanup-expired-packages-croncleanup_packages).
The config setting `OLDER_THAN` configures how long unreferenced blobs are kept before they get deleted.
## Cleanup Rules
@ -58,7 +57,7 @@ The patterns are case-insensitive which matches the behaviour of the package reg
### How the cleanup rules work
The cleanup rules are part of the [clean up job]({{< relref "doc/advanced/config-cheat-sheet.en-us.md#cron---cleanup-expired-packages-croncleanup_packages" >}}) and run periodically.
The cleanup rules are part of the [clean up job](../../../admin/config-cheat-sheet/#cron---cleanup-expired-packages-croncleanup_packages) and run periodically.
The cleanup rule:

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Vagrant Packages Repository'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/packages/vagrant.en-us.md'
@ -56,7 +55,7 @@ vagrant box add "https://forgejo.example.com/api/packages/testuser/vagrant/test_
```
This will install the latest version of the package. To add a specific version, use the `--box-version` parameter.
If the registry is private you can pass your [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) in the `VAGRANT_CLOUD_TOKEN` environment variable.
If the registry is private you can pass your [personal access token](../../api-usage/#authentication) in the `VAGRANT_CLOUD_TOKEN` environment variable.
## Supported commands

14
docs/user/project.md Normal file
View file

@ -0,0 +1,14 @@
---
title: 'Projects'
license: 'CC-BY-SA-4.0'
---
A project is a [kanban board](<https://en.wikipedia.org/wiki/Kanban_(development)>) to organize issues.
![screenshot of the project page](../_images/user/project/project.png)
## Card previews images
If the card preview in the project is set to **Images and Text**, the card preview displays images found in the corresponding issue. The most recent is displayed first, up to five images.
![example of card image preview](../_images/user/project/project-image.png)

View file

@ -1,11 +1,10 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Branch and tag protection'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/advanced/protected-tags.en-us.md'
---
# Protected branches
## Protected branches
Protected branches enforce restrictions such as force pushing or
merging unless a given number of approval are obtained on a pull
@ -14,19 +13,19 @@ request.
To protect a branch, you need to go to the repositorys **Settings** >
**Branch** page and add a new rule.
![Add a new rule](../../../../images/v1.19/user/protection/branch-protect.png)
![Add a new rule](../_images/user/protection/branch-protect.png)
The name of the branch can be a glob where / is the separator and **
spans accross separators. For instance `main`, `release/**` or `precious*`.
spans accross separators. For instance `main`, `release/**`or`precious\*`.
If two rules apply to the same branch, the one that has no glob takes
precedence.
# Protected tags
## Protected tags
Protected tags allow control over who has permission to create or update Git tags. Each rule allows you to match either an individual tag name, or use an appropriate pattern to control multiple tags at once.
## Setting up protected tags
### Setting up protected tags
To protect a tag, you need to follow these steps:
@ -35,7 +34,7 @@ To protect a tag, you need to follow these steps:
1. Choose the allowed users and/or teams. If you leave these fields empty no one is allowed to create or modify this tag.
1. Select **Save** to save the configuration.
## Pattern protected tags
### Pattern protected tags
The pattern uses [glob](https://pkg.go.dev/github.com/gobwas/glob#Compile) or regular expressions to match a tag name. For regular expressions you need to enclose the pattern in slashes.

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Push Options'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/usage/push-options.en-us.md'

View file

@ -1,19 +1,18 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Push Options'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/6e75739c5ba1de30c37adbd9e590674b583912c2/docs/content/doc/usage/push-to-create.en-us.md'
---
# Push To Create
## Push To Create
Push to create is a feature that allows you to push to a repository that does not exist yet in Forgejo. This is useful for automation and for allowing users to create repositories without having to go through the web interface. This feature is disabled by default.
## Enabling Push To Create
### Enabling Push To Create
In the `app.ini` file, set `ENABLE_PUSH_CREATE_USER` to `true` and `ENABLE_PUSH_CREATE_ORG` to `true` if you want to allow users to create repositories in their own user account and in organizations they are a member of respectively. Restart Forgejo for the changes to take effect. You can read more about these two options in the Configuration Cheat Sheet.
## Using Push To Create
### Using Push To Create
Assuming you have a git repository in the current directory, you can push to a repository that does not exist yet in Forgejo by running the following command:
@ -27,6 +26,6 @@ git push -u origin main
This assumes you are using an SSH remote, but you can also use HTTPS remotes as well.
## Push options (bonus)
### Push options (bonus)
Push-to-create will default to the visibility defined by `DEFAULT_PUSH_CREATE_PRIVATE` in `app.ini`. To explicitly set the visibility, you can use a push option.

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Repository Permissions'
license: 'CC-BY-SA-4.0'
origin_url: 'https://codeberg.org/Codeberg/Documentation/src/commit/ceec82002bbdc62cf27974e84df51369a4bfe0f9/content/collaborating/repo-permissions.md'
@ -134,4 +133,4 @@ There are also two units which can be toggled:
- External Wiki: access to external wiki.
- External Issues: access to the external issue tracker.
A team can be given the permission to create new repositories. When a member of such team creates a new repository, he/she will get administrator access to the repository.
A team can be given the permission to create new repositories. When a member of such team creates a new repository, they will get administrator access to the repository.

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: Semantic version
license: 'CC-BY-SA-4.0'
---
@ -10,7 +9,8 @@ license: 'CC-BY-SA-4.0'
- Minor is increased for backwards-compatible new features.
- Major is increased for breaking changes.
*something* could be :
_something_ could be :
- a command, an option or an argument, for a CLI ;
- a route path, a query parameter or a body property, for a REST API ;
- a text node, a button or a field, for a GUI.
@ -21,13 +21,13 @@ Since Forgejo has all of the above, changes to all of those components should be
As of Forgejo v1.19, there are two version numbering schemes:
* [Following the Gitea version](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/CONTRIBUTING/RELEASE.md#release-numbering) which is not a semantic version
* Used to name release files
* Used for tagging releases
* Displayed in the web interface
* Returned by the `/api/v1/version` API endpoint
* Forgejo semantic version
* Returned by the `/api/forgejo/v1/version` API endpoint
- [Following the Gitea version](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/CONTRIBUTING/RELEASE.md#release-numbering) which is not a semantic version
- Used to name release files
- Used for tagging releases
- Displayed in the web interface
- Returned by the `/api/v1/version` API endpoint
- Forgejo semantic version
- Returned by the `/api/forgejo/v1/version` API endpoint
For instance, the semantic version for https://code.forgejo.org can be obtained with:
@ -40,6 +40,6 @@ $ curl https://code.forgejo.org/api/forgejo/v1/version
The structure of the version number is `<major>.<minor>.<patch>+<build>-gitea-<gitea version>` where:
* `<major>.<minor>.<patch>` is conformant to [Semantic Versioning 2.0.0](https://semver.org/#semantic-versioning-200)
* `<build>` is the release build number of an otherwise identical source
* `gitea-<gitea version>` is the Gitea version this Forgejo release depends on
- `<major>.<minor>.<patch>` is conformant to [Semantic Versioning 2.0.0](https://semver.org/#semantic-versioning-200)
- `<build>` is the release build number of an otherwise identical source
- `gitea-<gitea version>` is the Gitea version this Forgejo release depends on

View file

@ -1,5 +1,4 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Webhooks'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/features/webhooks.en-us.md'
@ -184,6 +183,6 @@ There is a Test Delivery button in the webhook settings that allows to test the
Forgejo webhooks can be configured to send an [authorization header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization) to the target.
![screenshot of the webhook definition webpage](../../../../images/v1.19/user/webhooks/authorization-header.png)
![screenshot of the webhook definition webpage](../_images/user/webhooks/authorization-header.png)
The authentication string is stored encrypted in the database.

View file

@ -1,38 +1,41 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Integrated Wiki'
license: 'CC-BY-SA-4.0'
origin_url: 'https://codeberg.org/Codeberg/Documentation/src/commit/ceec82002bbdc62cf27974e84df51369a4bfe0f9/content/getting-started/wiki.md'
---
A [wiki](https://en.wikipedia.org/wiki/Wiki) is a collaborative space on the web. It is a common practice to use wikis to collect knowledge and share information.
A [wiki](https://en.wikipedia.org/wiki/Wiki) is a collaborative space on the web. It is a common practice to use wikis to collect knowledge and share information.
Codeberg allows you to add a wiki to a repo for additional documentation.
The user in these examples is `knut`, the polar bear and its repository is `foobar`.
## Activation and Permissions
To enable the wiki for a repository, visit the `Settings` page and activate `Enable Repository Wiki` in the `Advanced Section`. It will default to the built-in wiki which is described here, but you can add an URI to an external site the "Wiki" tab should link to.
> **Warning**
> Be aware that the wiki, once enabled, is accessible for *everyone* who has `read` access to your repository - on public repositories even anonymous guests can access the wiki.
> The wiki is *not* a suitable place for storing private information or secrets (like passwords).
> **Warning**
> Be aware that the wiki, once enabled, is accessible for _everyone_ who has `read` access to your repository - on public repositories even anonymous guests can access the wiki.
> The wiki is _not_ a suitable place for storing private information or secrets (like passwords).
To edit the wiki `write` permission to the repository is required.
## Wiki structure
The wiki is essentially a separate Git repo in your repository with a predefined name in the form of `<your-repository-name>.wiki.git`.
It consists of [Markdown](https://en.wikipedia.org/wiki/Markdown) files (file extension `.md`) and additional assets like images.
It consists of [Markdown](https://en.wikipedia.org/wiki/Markdown) files (file extension `.md`) and additional assets like images.
No further stylesheets are needed. The Markdown files are automatically rendered according to the selected Forgejo theme.
## Adding content via web
## Adding content via web
After you have enabled the wiki you are prompted to create the initial page `Home.md`.
The web UI in your browser is currently limited to adding, updating, and deleting pages; you can't manage assets like images this way.
![Wiki home page with edit buttons](../../../../images/v1.19/user/wiki/wiki_pageview.png)
![Wiki home page with edit buttons](../_images/user/wiki/wiki_pageview.png)
## Adding content via a local Git client
You can work with the wiki repo as you would with any other Git repo on Forgejo.
```shell
@ -45,6 +48,7 @@ git commit -am "create Home page"
Editing locally allows you to use your favorite editor (preferably with Markdown syntax check and highlighting) and manage additional assets like images.
### Adding images
You can add images to the root directory or a specific subfolder (like `assets` or `images`) using your local Git client.
A feasible workflow might look like this:
@ -62,7 +66,7 @@ git push
Now, you can reference the image in Markdown, like this:
```markdown
![image alt text](images/image.png "image title")
![image alt text](images/image.png 'image title')
```
After saving your changes, the image should be visible.
@ -70,20 +74,23 @@ After saving your changes, the image should be visible.
> In contrast to embedding external images, images in Git are only rendered after saving the wiki or Markdown file changes.
## Adding a sidebar and a footer
To enhance the usability of your wiki you can add a custom sidebar and a footer that are shown on every page. The sidebar will be displayed to the right of the main content and the footer below.
To enable the sidebar, just add a file named `_Sidebar.md` to your wiki. For a footer the file must be named `_Footer.md`.
Both file types allow common Markdown syntax to adjust the presentation to your needs.
Very basic example for a sidebar:
```markdown
- [[Home]]
### Content
- [Page 1](Page-1)
- [Page 1](./Page-1/)
> knuts wiki
```
> These files starting with `_` are hidden, so in the web UI you need to manually browse for the files. E.g. for our user *knut* and his *foobar* repo:
> These files starting with `_` are hidden, so in the web UI you need to manually browse for the files. E.g. for our user _knut_ and his _foobar_ repo:
> `https://codeberg.org/knut/foobar/wiki/_Sidebar`

View file

@ -1,12 +0,0 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Forgejo v1.19 documentation'
---
* [What is Forgejo?](https://forgejo.org/)
* [Installation](https://forgejo.org/download/)
* [FAQ](https://forgejo.org/faq/)
* [Administrator guide](admin)
* [User guide](user)
* [Developer guide](developer)
* [License](license)

View file

@ -1,124 +0,0 @@
---
layout: '~/layouts/Markdown.astro'
title: 'OAuth2 provider'
license: 'Apache-2.0'
origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/developers/oauth2-provider.en-us.md'
---
Forgejo supports acting as an OAuth2 provider to allow third party applications to access its resources with the user's consent.
## Endpoints
| Endpoint | URL |
| ------------------------ | ----------------------------------- |
| OpenID Connect Discovery | `/.well-known/openid-configuration` |
| Authorization Endpoint | `/login/oauth/authorize` |
| Access Token Endpoint | `/login/oauth/access_token` |
| OpenID Connect UserInfo | `/login/oauth/userinfo` |
| JSON Web Key Set | `/login/oauth/keys` |
## Supported OAuth2 Grants
At the moment Forgejo only supports the [**Authorization Code Grant**](https://tools.ietf.org/html/rfc6749#section-1.3.1) standard with additional support of the following extensions:
- [Proof Key for Code Exchange (PKCE)](https://tools.ietf.org/html/rfc7636)
- [OpenID Connect (OIDC)](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth)
To use the Authorization Code Grant as a third party application it is required to register a new application via the "Settings" (`/user/settings/applications`) section of the settings.
## Scoped Tokens
Forgejo supports the following scopes for tokens:
| Name | Description |
| ---- | ----------- |
| **(no scope)** | Grants read-only access to public user profile and public repositories. |
| **repo** | Full control over all repositories. |
| &nbsp;&nbsp;&nbsp; **repo:status** | Grants read/write access to commit status in all repositories. |
| &nbsp;&nbsp;&nbsp; **public_repo** | Grants read/write access to public repositories only. |
| **admin:repo_hook** | Grants access to repository hooks of all repositories. This is included in the `repo` scope. |
| &nbsp;&nbsp;&nbsp; **write:repo_hook** | Grants read/write access to repository hooks |
| &nbsp;&nbsp;&nbsp; **read:repo_hook** | Grants read-only access to repository hooks |
| **admin:org** | Grants full access to organization settings |
| &nbsp;&nbsp;&nbsp; **write:org** | Grants read/write access to organization settings |
| &nbsp;&nbsp;&nbsp; **read:org** | Grants read-only access to organization settings |
| **admin:public_key** | Grants full access for managing public keys |
| &nbsp;&nbsp;&nbsp; **write:public_key** | Grant read/write access to public keys |
| &nbsp;&nbsp;&nbsp; **read:public_key** | Grant read-only access to public keys |
| **admin:org_hook** | Grants full access to organizational-level hooks |
| **notification** | Grants full access to notifications |
| **user** | Grants full access to user profile info |
| &nbsp;&nbsp;&nbsp; **read:user** | Grants read access to user's profile |
| &nbsp;&nbsp;&nbsp; **user:email** | Grants read access to user's email addresses |
| &nbsp;&nbsp;&nbsp; **user:follow** | Grants access to follow/un-follow a user |
| **delete_repo** | Grants access to delete repositories as an admin |
| **package** | Grants full access to hosted packages |
| &nbsp;&nbsp;&nbsp; **write:package** | Grants read/write access to packages |
| &nbsp;&nbsp;&nbsp; **read:package** | Grants read access to packages |
| &nbsp;&nbsp;&nbsp; **delete:package** | Grants delete access to packages |
| **admin:gpg_key** | Grants full access for managing GPG keys |
| &nbsp;&nbsp;&nbsp; **write:gpg_key** | Grants read/write access to GPG keys |
| &nbsp;&nbsp;&nbsp; **read:gpg_key** | Grants read-only access to GPG keys |
| **admin:application** | Grants full access to manage applications |
| &nbsp;&nbsp;&nbsp; **write:application** | Grants read/write access for managing applications |
| &nbsp;&nbsp;&nbsp; **read:application** | Grants read access for managing applications |
| **sudo** | Allows to perform actions as the site admin. |
## Client types
Forgejo supports both confidential and public client types, [as defined by RFC 6749](https://datatracker.ietf.org/doc/html/rfc6749#section-2.1).
For public clients, a redirect URI of a loopback IP address such as `http://127.0.0.1/` allows any port. Avoid using `localhost`, [as recommended by RFC 8252](https://datatracker.ietf.org/doc/html/rfc8252#section-8.3).
## Example
**Note:** This example does not use PKCE.
1. Redirect to user to the authorization endpoint in order to get their consent for accessing the resources:
```curl
https://[YOUR-FORGEJO-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI& response_type=code&state=STATE
```
The `CLIENT_ID` can be obtained by registering an application in the settings. The `STATE` is a random string that will be send back to your application after the user authorizes. The `state` parameter is optional but should be used to prevent CSRF attacks.
![Authorization Page](/authorize.png)
The user will now be asked to authorize your application. If they authorize it, the user will be redirected to the `REDIRECT_URL`, for example:
```curl
https://[REDIRECT_URI]?code=RETURNED_CODE&state=STATE
```
2. Using the provided `code` from the redirect, you can request a new application and refresh token. The access token endpoints accepts POST requests with `application/json` and `application/x-www-form-urlencoded` body, for example:
```curl
POST https://[YOUR-FORGEJO-URL]/login/oauth/access_token
```
```json
{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"code": "RETURNED_CODE",
"grant_type": "authorization_code",
"redirect_uri": "REDIRECT_URI"
}
```
Response:
```json
{
"access_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjIsInR0IjowLCJleHAiOjE1NTUxNzk5MTIsImlhdCI6MTU1NTE3NjMxMn0.0-iFsAwBtxuckA0sNZ6QpBQmywVPz129u75vOM7wPJecw5wqGyBkmstfJHAjEOqrAf_V5Z-1QYeCh_Cz4RiKug",
"token_type": "bearer",
"expires_in": 3600,
"refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjIsInR0IjoxLCJjbnQiOjEsImV4cCI6MTU1NzgwNDMxMiwiaWF0IjoxNTU1MTc2MzEyfQ.S_HZQBy4q9r5SEzNGNIoFClT43HPNDbUdHH-GYNYYdkRfft6XptJBkUQscZsGxOW975Yk6RbgtGvq1nkEcklOw"
}
```
The `CLIENT_SECRET` is the unique secret code generated for this application. Please note that the secret will only be visible after you created/registered the application with Forgejo and cannot be recovered. If you lose the secret you must regenerate the secret via the application's settings.
The `REDIRECT_URI` in the `access_token` request must match the `REDIRECT_URI` in the `authorize` request.
3. Use the `access_token` to make [API requests](../api-usage) to access the user's resources.

View file

@ -1,15 +0,0 @@
---
layout: '~/layouts/Markdown.astro'
title: 'Projects'
license: 'CC-BY-SA-4.0'
---
A project is a [kanban board](https://en.wikipedia.org/wiki/Kanban_(development)) to organize issues.
![screenshot of the project page](../../../../images/v1.19/user/project/project.png)
# Card previews images
If the card preview in the project is set to **Images and Text**, the card preview displays images found in the corresponding issue. The most recent is displayed first, up to five images.
![example of card image preview](../../../../images/v1.19/user/project/project-image.png)