How to use protected meilisearch instance? #11379

Closed
opened 2025-11-02 09:36:05 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @erhaone on GitHub (Jul 31, 2023).

Description

ISSUE_INDEXER_CONN_STR = "http://xxxx.7700"

when my meilisearch is set master key, gitea can't startup successfully.I want to set api key in app.ini,but i don't know where should i set api key.

meilisearch doc suggest request with auth like this:
curl
-X GET 'http://localhost:7700/keys'
-H 'Authorization: Bearer MASTER_KEY'

Unable to issueIndexer.Init with connection http://172.29.158.11:7700 Error: unaccepted status code found: 401 expected: [202], MeilisearchApiError Message: The Authorization header is missing. It must use the bearer authorization method., Code: missing_authorization_header, Type: auth, Link: https://docs.meilisearch.com/errors#missing_authorization_header (path "POST /indexes" with method "CreateIndex")

Gitea Version

1.20.2

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

run from docker

Database

MySQL

Originally created by @erhaone on GitHub (Jul 31, 2023). ### Description ISSUE_INDEXER_CONN_STR = "http://xxxx.7700" when my meilisearch is set master key, gitea can't startup successfully.I want to set api key in app.ini,but i don't know where should i set api key. meilisearch doc suggest request with auth like this: curl \ -X GET 'http://localhost:7700/keys' \ -H 'Authorization: Bearer MASTER_KEY' Unable to issueIndexer.Init with connection http://172.29.158.11:7700 Error: unaccepted status code found: 401 expected: [202], MeilisearchApiError Message: The Authorization header is missing. It must use the bearer authorization method., Code: missing_authorization_header, Type: auth, Link: https://docs.meilisearch.com/errors#missing_authorization_header (path "POST /indexes" with method "CreateIndex") ### Gitea Version 1.20.2 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? run from docker ### Database MySQL
GiteaMirror added the type/questiontype/bug labels 2025-11-02 09:36:05 -06:00
Author
Owner

@techknowlogick commented on GitHub (Aug 1, 2023):

Under ISSUE_INDEXER_CONN_STR, you would have http://:apikey@localhost:7700 as it works with HTTP basic auth (note the : right before the API key in the URL`

@techknowlogick commented on GitHub (Aug 1, 2023): Under `ISSUE_INDEXER_CONN_STR`, you would have `http://:apikey@localhost:7700` as it works with HTTP basic auth (note the `:` right before the API key in the URL`
Author
Owner

@simahao commented on GitHub (Aug 1, 2023):

Under ISSUE_INDEXER_CONN_STR, you would have http://:apikey@localhost:7700 as it works with HTTP basic auth (note the : right before the API key in the URL`

Thinks.

@simahao commented on GitHub (Aug 1, 2023): > Under `ISSUE_INDEXER_CONN_STR`, you would have `http://:apikey@localhost:7700` as it works with HTTP basic auth (note the `:` right before the API key in the URL` Thinks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11379