### Example: Install Conan Package Source: https://docs.gitea.com/usage/packages/conan An example of installing a specific Conan package recipe ('ConanPackage/1.2@gitea/final') from the 'gitea' remote. ```bash conan install --remote=gitea ConanPackage/1.2@gitea/final ``` -------------------------------- ### Example: Install PyPI Package from Gitea Registry Source: https://docs.gitea.com/usage/packages/pypi An example of installing a specific package from the Gitea registry using pip with provided credentials and package name. ```bash pip install --index-url https://testuser:password123@gitea.example.com/api/packages/testuser/pypi/simple --no-deps test_package ``` -------------------------------- ### Run Gitea Setup Wizard Source: https://docs.gitea.com/enterprise/installation/windows Starts Gitea interactively for the initial setup. Access the wizard via `http://localhost:3000` and configure `AppDataPath` to `C:\gitea-data`. ```powershell cd C:\gitea .\gitea.exe web --config C:\gitea-data\custom\conf\app.ini ``` -------------------------------- ### Install a Specific Vagrant Box Version Source: https://docs.gitea.com/usage/packages/vagrant Example of installing a specific version of a Vagrant box from the Gitea package registry. ```bash vagrant box add "https://gitea.example.com/api/packages/testuser/vagrant/test_system" ``` -------------------------------- ### Enable and Start Gitea Service with systemd Source: https://docs.gitea.com/installation/linux-service Enables the Gitea service to start on boot and then starts it immediately. Use this command for systemd versions 220 and later. ```bash sudo systemctl enable gitea --now ``` -------------------------------- ### Start Gitea Service Source: https://docs.gitea.com/enterprise/installation/windows Starts the Gitea service after it has been installed using NSSM. ```powershell nssm start Gitea ``` -------------------------------- ### Install NPM Package Source: https://docs.gitea.com/usage/packages/npm Install a package from the Gitea npm registry. Replace `{package_name}` with the name of the package you wish to install. ```bash npm install {package_name} ``` ```bash npm install @test/test_package ``` -------------------------------- ### Install Make on Ubuntu/Debian Source: https://docs.gitea.com/development/hacking-on-gitea Use this command to install the Make utility on Ubuntu or Debian-based Linux distributions. ```bash sudo apt-get install make ``` -------------------------------- ### Build and Install Gitea from FreeBSD Port Source: https://docs.gitea.com/installation/install-from-package Instructions to install Gitea from the FreeBSD port for the most up-to-date version or to build with custom options. This involves navigating to the port directory, installing, and cleaning up. ```bash su - cd /usr/ports/www/gitea make install clean ``` -------------------------------- ### Enable and Start Supervisor Service with systemd Source: https://docs.gitea.com/installation/linux-service Enables the supervisor service to start on boot and then starts it immediately. Use this command for systemd versions 220 and later. ```bash sudo systemctl enable supervisor --now ``` -------------------------------- ### Install Debian Package Source: https://docs.gitea.com/usage/packages/debian Install a package from the configured Gitea Debian registry using `apt`. You can install the latest version or a specific version. ```bash # use latest version apt install {package_name} # use specific version apt install {package_name}={package_version} ``` -------------------------------- ### Example: Publish Conan Package Source: https://docs.gitea.com/usage/packages/conan An example of uploading a specific Conan package recipe ('ConanPackage/1.2@gitea/final') to the 'gitea' remote. ```bash conan upload --remote=gitea ConanPackage/1.2@gitea/final ``` -------------------------------- ### Install Gitea on FreeBSD with pkg Source: https://docs.gitea.com/installation/install-from-package Use this command to install the pre-built Gitea binary package on FreeBSD. ```bash pkg install gitea ``` -------------------------------- ### Install Make via Chocolatey on Windows Source: https://docs.gitea.com/development/hacking-on-gitea Install the Make utility on Windows using the Chocolatey package manager. ```bash choco install make ``` -------------------------------- ### Example: Add and Login to Conan Remote Source: https://docs.gitea.com/usage/packages/conan An example demonstrating how to add and log in to the 'gitea' remote with specific user credentials. ```bash conan remote add gitea https://gitea.example.com/api/packages/testuser/conan conan remote login gitea testuser --password password123 ``` -------------------------------- ### Start Gitea Server on a Specific Port Source: https://docs.gitea.com/administration/command-line Starts the Gitea web server on a specified port. This example shows how to change the default port from 3000 to 80. ```bash gitea web --port 80 ``` -------------------------------- ### Install a Chef Package Source: https://docs.gitea.com/usage/packages/chef Execute this command to install a Chef cookbook from the Gitea package registry. You can optionally specify a package version. ```bash knife supermarket install {package_name} ``` ```bash knife supermarket install {package_name} {package_version} ``` -------------------------------- ### Install a Go Package Source: https://docs.gitea.com/usage/packages/go Instruct Go to use the Gitea package registry as a proxy to install Go packages. This involves setting the GOPROXY environment variable. ```APIDOC ## Install Go Package using GOPROXY ### Description Instruct Go to use the package registry as a proxy to install Go packages. This is achieved by setting the `GOPROXY` environment variable. ### Usage To install the latest version: ```bash GOPROXY=https://gitea.example.com/api/packages/{owner}/go go install {package_name} # or GOPROXY=https://gitea.example.com/api/packages/{owner}/go go install {package_name}@latest ``` To install a specific version: ```bash GOPROXY=https://gitea.example.com/api/packages/{owner}/go go install {package_name}@{package_version} ``` ### Parameters - **owner** (string) - Required - The owner of the package. - **package_name** (string) - Required - The name of the package to install. - **package_version** (string) - Optional - The specific version of the package to install. If omitted, the latest version is used. ``` -------------------------------- ### Add Helm Repository and Install Chart Source: https://docs.gitea.com/usage/packages/helm Instructions for adding the Gitea Helm repository and installing a Helm chart. This involves adding the repository, updating your local Helm repositories, and then installing the chart with a specified name. ```bash helm repo add --username {username} --password {password} {repo} https://gitea.example.com/api/packages/{owner}/helm helm repo update helm install {name} {repo}/{chart} ``` -------------------------------- ### Install NuGet Package Source: https://docs.gitea.com/usage/packages/nuget Install a NuGet package from the Gitea package registry. Specify the source name, package name, and desired version. ```bash dotnet add package --source {source_name} --version {package_version} {package_name} ``` ```bash dotnet add package --source gitea --version 1.0.0 test_package ``` -------------------------------- ### Install RubyGems Package with gem Source: https://docs.gitea.com/usage/packages/rubygems Use the `gem install --host` command to directly install a package from your Gitea registry. ```shell gem install --host https://gitea.example.com/api/packages/{owner}/rubygems {package_name} ``` ```shell gem install --host https://gitea.example.com/api/packages/testuser/rubygems test_package ``` -------------------------------- ### Enable and Start Gitea Service Separately with systemd Source: https://docs.gitea.com/installation/linux-service Enables the Gitea service to start on boot and then starts it as a separate command. This is useful for systemd versions prior to 220. ```bash sudo systemctl enable gitea ``` ```bash sudo systemctl start gitea ``` -------------------------------- ### Install Make on Fedora/RHEL/CentOS Source: https://docs.gitea.com/development/hacking-on-gitea Use this command to install the Make utility on Fedora, RHEL, or CentOS-based Linux distributions. ```bash sudo yum install make ``` -------------------------------- ### Add Gitea Helm Repository and Install Source: https://docs.gitea.com/installation/install-on-kubernetes Add the Gitea Helm chart repository and perform a basic installation of Gitea on Kubernetes. ```bash helm repo add gitea-charts https://dl.gitea.com/charts/ helm install gitea gitea-charts/gitea ``` -------------------------------- ### Install Arch Package with Pacman Source: https://docs.gitea.com/usage/packages/arch Install a package from the configured Arch registry using the pacman sync command. Replace {package_name} with the name of the package you wish to install. ```bash pacman -Sy {package_name} ``` -------------------------------- ### Add RPM Registry Source (Examples) Source: https://docs.gitea.com/usage/packages/rpm Examples of adding the Gitea RPM registry source without a group and with a specific group. ```bash # without a group dnf config-manager --add-repo https://gitea.example.com/api/packages/testuser/rpm.repo ``` ```bash # with the group 'centos/el7' dnf config-manager --add-repo https://gitea.example.com/api/packages/testuser/rpm/centos/el7.repo ``` -------------------------------- ### Install Maven Packages Source: https://docs.gitea.com/usage/packages/maven Command to install Maven packages after configuring dependencies. ```bash mvn install ``` -------------------------------- ### Issue Configuration Example Source: https://docs.gitea.com/usage/issues-prs/issue-pull-request-templates This is an example of an issue configuration file. It shows how to enable blank issues and define custom contact links. ```yaml blank_issues_enabled: true contact_links: - name: Gitea url: https://gitea.com about: Visit the Gitea Website ``` -------------------------------- ### Install Gitea on Windows with Chocolatey Source: https://docs.gitea.com/installation/install-from-package Use this command to install the Gitea package on Windows using the Chocolatey package manager. ```bash choco install gitea ``` -------------------------------- ### Install Latest Pub Package Version Source: https://docs.gitea.com/usage/packages/pub Install the latest version of a Pub package from the Gitea registry. Ensure the hosted URL is correctly specified. ```bash dart pub add mypackage --hosted-url=https://gitea.example.com/api/packages/testuser/pub/ ``` -------------------------------- ### Install Gitea on Alpine Linux with apk Source: https://docs.gitea.com/installation/install-from-package Use this command to install the Gitea package on Alpine Linux from its community repository. ```bash apk add gitea ``` -------------------------------- ### Start Local ElasticSearch Instance Source: https://docs.gitea.com/development/hacking-on-gitea Starts a local ElasticSearch instance using Docker. Ensure the data directory is created and has correct permissions. ```bash mkdir -p $(pwd)/data/elasticsearch sudo chown -R 1000:1000 $(pwd)/data/elasticsearch docker run --rm --memory="4g" -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e "discovery.type=single-node" -v "$(pwd)/data/elasticsearch:/usr/share/elasticsearch/data" docker.elastic.co/elasticsearch/elasticsearch:7.16.3 ``` -------------------------------- ### Install a Vagrant Box from Gitea Registry Source: https://docs.gitea.com/usage/packages/vagrant This command installs a Vagrant box from the Gitea package registry. You can specify the owner and package name. The latest version is installed by default; use --box-version for specific versions. For private registries, set the VAGRANT_CLOUD_TOKEN environment variable. ```bash vagrant box add "https://gitea.example.com/api/packages/{owner}/vagrant/{package_name}" ``` -------------------------------- ### Install a Composer Package Source: https://docs.gitea.com/usage/packages/composer Install a package from the Gitea package registry using the Composer `require` command. You can specify a particular version if needed. ```APIDOC ## Install a Composer Package ### Description Installs a package from the configured Gitea package registry using Composer. ### Command ```bash composer require {package_name} ``` To specify a package version: ```bash composer require {package_name}:{package_version} ``` #### Parameters - **package_name** (string) - Required - The name of the package to install. - **package_version** (string) - Optional - The specific version of the package to install. ``` -------------------------------- ### Install Gitea on Linux with Snap Source: https://docs.gitea.com/installation/install-from-package Use this command to install the Gitea Snap package. Note that the strictly confined nature of snaps may limit some Gitea functionalities. ```bash snap install gitea ``` -------------------------------- ### Install Gitea on Gentoo Linux with emerge Source: https://docs.gitea.com/installation/install-from-package Use this command to install the Gitea package on Gentoo Linux from its official community repository. ```bash emerge gitea -va ``` -------------------------------- ### Install Supervisor on Debian/Ubuntu Source: https://docs.gitea.com/installation/linux-service Installs the supervisor process control system using the apt package manager. This is a prerequisite for running Gitea with supervisor. ```bash sudo apt install supervisor ``` -------------------------------- ### Start Act Runner Daemon with Configuration File Source: https://docs.gitea.com/usage/actions/act-runner Start the act runner daemon using a specified configuration file. This allows the daemon to use pre-defined settings. ```bash ./act_runner daemon --config config.yaml ``` -------------------------------- ### Install Alpine Package (Latest Version) Source: https://docs.gitea.com/usage/packages/alpine Install the latest available version of a package from the configured Alpine registry using the apk add command. ```bash # use latest version apk add {package_name} ``` -------------------------------- ### Start Gitea Server Source: https://docs.gitea.com/administration/command-line Starts the Gitea web server. The default port is 3000. You can specify a different port using the --port option. ```bash gitea web ``` -------------------------------- ### Install RPM Package (Specific Version) Source: https://docs.gitea.com/usage/packages/rpm Installs a specific version of a package from the configured RPM registry using `dnf`, including version, release, and architecture. ```bash # use specific version dnf install {package_name}-{package_version}.{architecture} ``` -------------------------------- ### Create Data and Config Directories Source: https://docs.gitea.com/installation/install-with-docker-rootless Prepare the necessary directories for Gitea's data and configuration files before starting the Docker container. ```bash mkdir -p gitea/{data,config} cd gitea touch docker-compose.yml ``` -------------------------------- ### Create Gitea Directory Structure and Set Permissions Source: https://docs.gitea.com/installation/install-from-binary Create the necessary directories for Gitea's data, custom configurations, and logs, and set appropriate ownership and permissions. Also, create a directory for the configuration file with temporary write permissions for the installer. ```bash mkdir -p /var/lib/gitea/{custom,data,log} chown -R git:git /var/lib/gitea/ chmod -R 750 /var/lib/gitea/ mkdir /etc/gitea chown root:git /etc/gitea chmod 770 /etc/gitea ``` -------------------------------- ### Install Go Package using GOPROXY Source: https://docs.gitea.com/usage/packages/go Instruct Go to use the package registry as a proxy to install Go packages. This can be used for the latest version or a specific version of a package. ```bash # use latest version GOPROXY=https://gitea.example.com/api/packages/{owner}/go go install {package_name} # or GOPROXY=https://gitea.example.com/api/packages/{owner}/go go install {package_name}@latest # use specific version GOPROXY=https://gitea.example.com/api/packages/{owner}/go go install {package_name}@{package_version} ``` -------------------------------- ### Install External Renderer Dependencies in Dockerfile Source: https://docs.gitea.com/administration/external-renderers Example Dockerfile snippet showing how to install dependencies for external renderers like asciidoctor, pandoc, and Jupyter using `apk` and `pipx`. ```dockerfile FROM docker.gitea.com/gitea:1.26.2 [...] COPY custom/app.ini /data/gitea/conf/app.ini [...] RUN apk --no-cache add asciidoctor freetype freetype-dev gcc g++ libpng libffi-dev pandoc python3-dev py3-zmq pipx # install any other package you need for your external renderers RUN pipx install jupyter docutils --include-deps --global # add above any other python package you may need to install ``` -------------------------------- ### Basic Docker Run for Gitea Act Runner Source: https://docs.gitea.com/usage/actions/act-runner Use this command for a quick start with minimal parameters. Ensure you have the registration token, a runner name, and a container name. ```docker docker run \ -e GITEA_INSTANCE_URL= \ -e GITEA_RUNNER_REGISTRATION_TOKEN= \ -e GITEA_RUNNER_NAME= \ --name \ -v /var/run/docker.sock:/var/run/docker.sock \ -d docker.io/gitea/act_runner:latest ``` -------------------------------- ### Docker Compose Commands for Management Source: https://docs.gitea.com/installation/install-with-docker Essential Docker Compose commands for starting, checking status, viewing logs, and stopping your Gitea setup. ```bash docker compose up -d docker compose ps docker compose logs docker compose down ``` -------------------------------- ### Build Gitea with Recommended Tags Source: https://docs.gitea.com/installation/install-from-source Build Gitea using the recommended set of tags for a production-ready binary, including 'bindata', 'sqlite', and 'sqlite_unlock_notify'. ```bash TAGS="bindata sqlite sqlite_unlock_notify" make build ``` -------------------------------- ### Install Conda Package Source: https://docs.gitea.com/usage/packages/conda Use the `conda install` command to install packages from the Gitea registry. You can specify the package name, version, or channel. ```bash conda install {package_name} conda install {package_name}={package_version} conda install -c {channel} {package_name} ``` -------------------------------- ### Install Package from CRAN Registry Source: https://docs.gitea.com/usage/packages/cran Install an R package from the Gitea CRAN registry using the install.packages function. Specify the package name to be installed. ```r install.packages("{package_name}") ``` ```r install.packages("testpackage") ``` -------------------------------- ### Enable and Start Supervisor Service Separately with systemd Source: https://docs.gitea.com/installation/linux-service Enables the supervisor service to start on boot and then starts it as a separate command. This is useful for systemd versions prior to 220. ```bash sudo systemctl enable supervisor ``` ```bash sudo systemctl start supervisor ``` -------------------------------- ### Basic Gitea Docker Compose Setup with SQLite Source: https://docs.gitea.com/installation/install-with-docker This is the most basic setup for Gitea using Docker Compose. It initializes a volume and network and uses SQLite3 for the database. Ensure the volume has correct permissions. ```yaml networks: gitea: external: false services: server: image: docker.gitea.com/gitea:1.26.2 container_name: gitea environment: - USER_UID=1000 - USER_GID=1000 restart: always networks: - gitea volumes: - ./gitea:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "3000:3000" - "222:22" ``` -------------------------------- ### Start Gitea Server with Custom Configuration and PID File Source: https://docs.gitea.com/administration/command-line Starts the Gitea web server using a custom configuration file and specifies a PID file path. This is useful for custom deployments. ```bash gitea web --config /etc/gitea.ini --pid /some/custom/gitea.pid ``` -------------------------------- ### Install Maven Package Dependency Source: https://docs.gitea.com/usage/packages/maven Add a dependency to your pom.xml to install a Maven package from the Gitea registry. ```xml com.test.package test_project 1.0.0 ``` -------------------------------- ### Install PyPI Package from Gitea Registry Source: https://docs.gitea.com/usage/packages/pypi Install a PyPI package from the Gitea registry using pip. Specify the index URL with your Gitea credentials and owner. The --no-deps flag can be used to prevent automatic dependency installation. ```bash pip install --index-url https://{username}:{password}@gitea.example.com/api/packages/{owner}/pypi/simple --no-deps {package_name} ``` -------------------------------- ### Install Composer Package Source: https://docs.gitea.com/usage/packages/composer Command to install a package from the configured Gitea Composer registry. The package name is required. ```bash composer require {package_name} ``` -------------------------------- ### Build and Run Gitea Source: https://docs.gitea.com/development/hacking-on-gitea Build the Gitea application and run it. Ensure frontend resources are built if necessary. ```bash make build && ./gitea ``` -------------------------------- ### Upgrade Gitea Docker Installation Source: https://docs.gitea.com/installation/install-with-docker Steps to upgrade your Gitea installation by updating the Docker image and restarting the containers. ```bash # Edit `docker-compose.yml` to update the version, if you have one specified # Pull new images docker compose pull # Start a new container, automatically removes old one docker compose up -d ``` -------------------------------- ### Local Persistent Volume Provisioner Output Source: https://docs.gitea.com/enterprise/features/actions-runner-controller Example output indicating the successful creation and configuration of resources for the local-path-provisioner in Kubernetes. ```bash namespace/local-path-storage created serviceaccount/local-path-provisioner-service-account created role.rbac.authorization.k8s.io/local-path-provisioner-role created Warning: resource clusterroles/local-path-provisioner-role is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically. clusterrole.rbac.authorization.k8s.io/local-path-provisioner-role configured rolebinding.rbac.authorization.k8s.io/local-path-provisioner-bind created Warning: resource clusterrolebindings/local-path-provisioner-bind is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically. clusterrolebinding.rbac.authorization.k8s.io/local-path-provisioner-bind configured deployment.apps/local-path-provisioner created Warning: resource storageclasses/local-path is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically. storageclass.storage.k8s.io/local-path configured configmap/local-path-config created ``` -------------------------------- ### Install Gitea as a Windows Service with NSSM Source: https://docs.gitea.com/enterprise/installation/windows Registers Gitea as a Windows service using NSSM. Configure output/error redirection and the startup directory in the NSSM editor. ```powershell nssm install Gitea "C:\gitea\gitea.exe" "web" "--config" "C:\gitea-data\custom\conf\app.ini" ``` -------------------------------- ### Install Gitea on macOS with Homebrew Source: https://docs.gitea.com/installation/install-from-package Use this command to install the Gitea package on macOS using the Homebrew package manager. ```bash brew install gitea ``` -------------------------------- ### Install RPM Package (Latest Version) Source: https://docs.gitea.com/usage/packages/rpm Installs the latest available version of a package from the configured RPM registry using `dnf`. ```bash # use latest version dnf install {package_name} ``` -------------------------------- ### Run Gitea Binary Source: https://docs.gitea.com/installation/install-from-source Execute the compiled Gitea binary to start the web server. The server can be stopped by pressing Ctrl+C. ```bash ./gitea web ``` -------------------------------- ### Install RubyGems Package with Bundler Source: https://docs.gitea.com/usage/packages/rubygems Configure your `Gemfile` with a `source` block pointing to your Gitea registry to install packages using Bundler. ```ruby source "https://gitea.example.com/api/packages/{owner}/rubygems" do gem "{package_name}" end ``` ```ruby source "https://gitea.example.com/api/packages/testuser/rubygems" do gem "test_package" end ``` ```shell bundle install ```