Gitee supports two authentication methods in the current backend implementation: OAUTH_WEB and PAT.
Backend Prerequisites
Common configuration:GIT_CREDENTIALS_KEY: Used to encrypt and save connection credentials.BACKEND_PUBLIC_URLorPUBLIC_API_URL: Used to generate theWebhook URLdisplayed on the page.FRONTEND_URL: The address to redirect to after OAuth completion.
GITEE_CLIENT_IDGITEE_CLIENT_SECRETGITEE_REDIRECT_URI(e.g.,http://localhost:3001/v1/git/connections/callback/gitee)
GITEE_SCOPESCODE_XPERT_MENTION(default@xpert-ai, used as a keyword to trigger issues)
PAT method, Gitee OAuth-related variables are not required.
Web Configuration Steps
Method 1: OAuth Web
- Open
Settings -> Connectors(/settings/connectors). - Select
Provider = Gitee,Auth method = OAUTH_WEB. - Copy the
Webhook URLfrom the page. - Click
Start Connectionto redirect to Gitee authorization and complete the authorization. - After redirecting back, the connection will appear in the
Existing Connectionslist.
Method 2: PAT
- Select
Provider = Gitee,Auth method = PAT. - A
Personal Access Tokenfield will appear (required). - Fill in the token and click
Submit Connection.
Webhook Configuration Recommendations
- Enter the
Webhook URLprovided by the page in the Gitee repository webhook settings. - For issue events, the comment review process is triggered only when the content includes
@xpert-ai(or theCODE_XPERT_MENTIONconfiguration value).
Frequently Asked Questions
Missing GITEE_CLIENT_ID or GITEE_REDIRECT_URI: Missing required OAuth environment variables.Missing Gitee OAuth config: Usually caused byGITEE_CLIENT_SECRETnot being configured.