PageSourceSearch

https://woodpecker-ci.org/assets/js/8a60b914.2905125f.js

js woodpecker-ci.org collected 2026-10-04 00:32:11 UTC 8,957 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwoodpecker=self.webpackChunkwoodpecker||[]).push([["4549"],{30925(e,i,t){t.r(i),t.d(i,{metadata:()=>n,default:()=>h,frontMatter:()=>r,contentTitle:()=>a,toc:()=>d,assets:()=>c});var n=JSON.parse('{"id":"administration/forges/gitea","title":"Gitea","description":"Woodpecker comes with built-in support for Gitea. To enable Gitea you should configure the Woodpecker container using the following environment variables:","source":"@site/versioned_docs/version-2.8/30-administration/11-forges/30-gitea.md","sourceDirName":"30-administration/11-forges","slug":"/administration/forges/gitea","permalink":"/docs/2.8/administration/forges/gitea","draft":false,"unlisted":false,"editUrl":"https://github.com/woodpecker-ci/woodpecker/edit/main/docs/versioned_docs/version-2.8/30-administration/11-forges/30-gitea.md","tags":[],"version":"2.8","sidebarPosition":30,"frontMatter":{"toc_max_heading_level":2},"sidebar":"tutorialSidebar","previous":{"title":"GitHub","permalink":"/docs/2.8/administration/forges/github"},"next":{"title":"Forgejo","permalink":"/docs/2.8/administration/forges/forgejo"}}'),o=t(94686),s=t(23191);let r={toc_max_heading_level:2},a="Gitea",c={},d=[{value:"Gitea on the same host with containers",id:"gitea-on-the-same-host-with-containers",level:2},{value:"Registration",id:"registration",level:2},{value:"Configuration",id:"configuration",level:2},{value:"<code>WOODPECKER_GITEA</code>",id:"woodpecker_gitea",level:3},{value:"<code>WOODPECKER_GITEA_URL</code>",id:"woodpecker_gitea_url",level:3},{value:"<code>WOODPECKER_GITEA_CLIENT</code>
1",id:"woodpecker_gitea_client",level:3},{value:"<code>WOODPECKER_GITEA_CLIENT_FILE</code>",id:"woodpecker_gitea_client_file",level:3},{value:"<code>WOODPECKER_GITEA_SECRET</code>",id:"woodpecker_gitea_secret",level:3},{value:"<code>WOODPECKER_GITEA_SECRET_FILE</code>",id:"woodpecker_gitea_secret_file",level:3},{value:"<code>WOODPECKER_GITEA_SKIP_VERIFY</code>",id:"woodpecker_gitea_skip_verify",level:3},{value:"Advanced options",id:"advanced-options",level:2},{value:"<code>WOODPECKER_DEV_GITEA_OAUTH_URL</code>",id:"woodpecker_dev_gitea_oauth_url",level:3}];function l(e){let i={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.header,{children:(0,o.jsx)(i.h1,{id:"gitea",children:"Gitea"})}),"\n",(0,o.jsx)(i.p,{children:"Woodpecker comes with built-in support for Gitea. To enable Gitea you should configure the Woodpecker container using the following environment variables:"}),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-ini",children:"WOODPECKER_GITEA=true\nWOODPECKER_GITEA_URL=YOUR_GITEA_URL\nWOODPECKER_GITEA_CLIENT=YOUR_GITEA_CLIENT\nWOODPECKER_GITEA_SECRET=YOUR_GITEA_CLIENT_SECRET\n"})}),"\n",(0,o.jsx)(i.h2,{id:"gitea-on-the-same-host-with-containers",children:"Gitea on the same host with containers"}),"\n",(0,o.jsxs)(i.p,{children:["If you have Gitea also running on the same host within a container, make sure the agent does have access to it.\nThe agent tries to clone using the URL which Gitea reports through its API. For simplified connectivity, you should add the Woodpecker agent to the same docker network as Gitea is in.\nOtherwise, the communication should go via the ",(0,o.jsx)(i.code,{children:"docker0"})," gateway (usually 172.17.0.1)."]}),"\n",(0,o.jsxs)(i.p,{children:["To configure the Docker network if the network's name is ",(0,o.jsx)(i.code,{children:"gitea"}),", configure it like this:"]}),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-diff",metastring:'title="docker-compose.yaml"',children:" version: '3'\n\n services:\n   [...]\n   woodpecker-agent:\n     [...]\n     environment:\n       - [...]\n+      - WOODPECKER_BACKEND_DOCKER_NETWORK=gitea\n"})}),"\n",(0,o.jsx)(i.h2,{id:"registration",children:"Registration"}),"\n",(0,o.jsxs)(i.p,{children:["Register your application with Gitea to create your client id and secret. You can find the OAuth applications settings of Gitea at ",(0,o.jsx)(i.code,{children:"https://gitea.<host>/user/settings/"}),". It is very import the authorization callback URL matches your http(s) scheme and hostname exactly with ",(0,o.jsx)(i.code,{children:"https://<host>/authorize"})," as the path."]}),"\n",(0,o.jsxs)(i.p,{children:["If you run the Woodpecker CI server on the same host as the Gitea instance, you might also need to allow local connections in Gitea, since version ",(0,o.jsx)(i.code,{children:"v1.16"}),". Otherwise webhooks will fail. Add the following lines to your Gitea configuration (usually at ",(0,o.jsx)(i.code,{children:"/etc/gitea/conf/app.ini"}),")."]}),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-ini",children:"[webhook]\nALLOWED_HOST_LIST=external,loopback\n"})}),"\n",(0,o.jsxs)(i.p,{children:["For reference see ",(0,o.jsx)(i.a,{href:"https://docs.gitea.io/en-us/config-cheat-sheet/#webhook-webhook",children:"Configuration Cheat Sheet"}),"."]}),"\n",(0,o.jsx)(i.p,{children:(0,o.jsx)(i.img,{alt:"gitea oauth setup",src:t(49159).A+"",width:"1301",height:"875"})}),"\n",(0,o.jsx)(i.h2,{id:"configuration",children:"Configuration"}),"\n",(0,o.jsx)(i.p,{children:"This is a full list of configuration options. Please note that many of these options use default configuration values that should work for the majority of installations."}),"\n",(0,o.jsx)(i.h3,{id:"woodpecker_gitea",children:(0,o.jsx)(i.code,{children:"WOODPECKER_GITEA"})}),"\n",(0,o.jsxs)(i.blockquote,{children:["\n",(0,o.jsxs)(i.p,{children:["Default: ",(0,o.jsx)(i.code,{children:"false"})]}),"\n"]}),"\n",(0,o.jsx)(i.p,{children:"Enables the Gitea driver."}),"\n",(0,o.jsx)(i.h3,{id:"woodpecker_gitea_url",children:(0,o.jsx)(i.co
1de,{children:"WOODPECKER_GITEA_URL"})}),"\n",(0,o.jsxs)(i.blockquote,{children:["\n",(0,o.jsxs)(i.p,{children:["Default: ",(0,o.jsx)(i.code,{children:"https://try.gitea.io"})]}),"\n"]}),"\n",(0,o.jsx)(i.p,{children:"Configures the Gitea server address."}),"\n",(0,o.jsx)(i.h3,{id:"woodpecker_gitea_client",children:(0,o.jsx)(i.code,{children:"WOODPECKER_GITEA_CLIENT"})}),"\n",(0,o.jsxs)(i.blockquote,{children:["\n",(0,o.jsx)(i.p,{children:"Default: empty"}),"\n"]}),"\n",(0,o.jsx)(i.p,{children:"Configures the Gitea OAuth client id. This is used to authorize access."}),"\n",(0,o.jsx)(i.h3,{id:"woodpecker_gitea_client_file",children:(0,o.jsx)(i.code,{children:"WOODPECKER_GITEA_CLIENT_FILE"})}),"\n",(0,o.jsxs)(i.blockquote,{children:["\n",(0,o.jsx)(i.p,{children:"Default: empty"}),"\n"]}),"\n",(0,o.jsxs)(i.p,{children:["Read the value for ",(0,o.jsx)(i.code,{children:"WOODPECKER_GITEA_CLIENT"})," from the specified filepath"]}),"\n",(0,o.jsx)(i.h3,{id:"woodpecker_gitea_secret",children:(0,o.jsx)(i.code,{children:"WOODPECKER_GITEA_SECRET"})}),"\n",(0,o.jsxs)(i.blockquote,{children:["\n",(0,o.jsx)(i.p,{children:"Default: empty"}),"\n"]}),"\n",(0,o.jsx)(i.p,{children:"Configures the Gitea OAuth client secret. This is used to authorize access."}),"\n",(0,o.jsx)(i.h3,{id:"woodpecker_gitea_secret_file",children:(0,o.jsx)(i.code,{children:"WOODPECKER_GITEA_SECRET_FILE"})}),"\n",(0,o.jsxs)(i.blockquote,{children:["\n",(0,o.jsx)(i.p,{children:"Default: empty"}),"\n"]}),"\n",(0,o.jsxs)(i.p,{children:["Read the value for ",(0,o.jsx)(i.code,{children:"WOODPECKER_GITEA_SECRET"})," from the specified filepath"]}),"\n",(0,o.jsx)(i.h3,{id:"woodpecker_gitea_skip_verify",children:(0,o.jsx)(i.code,{children:"WOODPECKER_GITEA_SKIP_VERIFY"})}),"\n",(0,o.jsxs)(i.blockquote,{children:["\n",(0,o.jsxs)(i.p,{children:["Default: ",(0,o.jsx)(i.code,{children:"false"})]}),"\n"]}),"\n",(0,o.jsx)(i.p,{children:"Configure if SSL verification should be skipped."}),"\n",(0,o.jsx)(i.h2,{id:"advanced-options",children:"Advanced options"}),"\n",(0,o.jsx)(i.h3,{id:"woodpecker_dev_gitea_oauth_url",children:(0,o.jsx)(i.code,{children:"WOODPECKER_DEV_GITEA_OAUTH_URL"})}),"\n",(0,o.jsxs)(i.blockquote,{children:["\n",(0,o.jsxs)(i.p,{children:["Default: value of ",(0,o.jsx)(i.code,{children:"WOODPECKER_GITEA_URL"})]}),"\n"]}),"\n",(0,o.jsxs)(i.p,{children:["Configures the user-facing Gitea server address. Should be used if ",(0,o.jsx)(i.code,{children:"WOODPECKER_GITEA_URL"})," points to an internal URL used for API requests."]})]})}function h(e={}){let{wrapper:i}={...(0,s.R)(),...e.components};return i?(0,o.jsx)(i,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},49159(e,i,t){t.d(i,{A:()=>n});let n=t.p+"assets/images/gitea_oauth-7f5d2bc8bfd0c02a227a328fff349af3.gif"},23191(e,i,t){t.d(i,{R:()=>r,x:()=>a});var n=t(92990);let o={},s=n.createContext(o);function r(e){let i=n.useContext(s);return n.useMemo(function(){return"function"==typeof e?e(i):{...i,...e}},[i,e])}function a(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),n.createElement(s.Provider,{value:i},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.