migration can only call allowed HTTP servers #9065

Closed
opened 2025-11-02 08:27:59 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @GISerliang on GitHub (Jun 14, 2022).

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

Originally created by @GISerliang on GitHub (Jun 14, 2022). ### 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](https://user-images.githubusercontent.com/11342604/173555083-f28f3459-ae15-4d30-bef6-a7bf0c2676f3.png) ### Git Version 2.30.3 ### Operating System _No response_ ### How are you running Gitea? Deployed in docker ### Database PostgreSQL
GiteaMirror added the issue/needs-feedback label 2025-11-02 08:27:59 -06:00
Author
Owner

@42wim commented on GitHub (Jun 18, 2022):

Does it work if you change it to ALLOWED_DOMAINS = api.github.com,github.com,gitlab.com
or ALLOWED_DOMAINS = *.github.com,github.com,gitlab.com

@42wim commented on GitHub (Jun 18, 2022): Does it work if you change it to `ALLOWED_DOMAINS = api.github.com,github.com,gitlab.com` or `ALLOWED_DOMAINS = *.github.com,github.com,gitlab.com`
Author
Owner

@wxiaoguang commented on GitHub (Jun 18, 2022):

It's not well documented that wildcard is supported.

@wxiaoguang commented on GitHub (Jun 18, 2022): It's not well documented that wildcard is supported.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9065