Skip to content

migration can only call allowed HTTP servers #19966

Closed
@GISerliang

Description

@GISerliang

Description

I used some tasks to get mirrors from github automatically, but I got an error like this:
...ervices/task/task.go:56:handle() [E] Run task failed: Get "https://api.github.com/repos/atom/atom": dial tcp 20.205.243.168:443: migration can only call allowed HTTP servers (check your migrations.ALLOWED_DOMAINS/ALLOW_LOCALNETWORKS setting), deny 'api.github.com(20.205.243.168:443)'

app.ini config like this, but not working:

[migrations]
SKIP_TLS_VERIFY     = true
ALLOW_LOCALNETWORKS = true
ALLOWED_DOMAINS     = github.com,gitlab.com

[webhook]
SKIP_TLS_VERIFY = true

IF I leave ALLOWED_DOMAINS to blank, I will get another error:
You can not import from disallowed hosts, please ask the admin to check ALLOWED_DOMAINS/ALLOW_LOCALNETWORKS/BLOCKED_DOMAINS settings.

Gitea Version

1.16.8

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

Git Version

2.30.3

Operating System

No response

How are you running Gitea?

Deployed in docker

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detail

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions