migrate from github fail when use the 'custom/conf/app.example.ini' #9211

Closed
opened 2025-11-02 08:32:17 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @soyozhang on GitHub (Jul 12, 2022).

Description

I run gitea with docker ,and when I want to migrate project from git, It shows fail and needs me to configure the migrations-ALLOWED_DOMAINS,BLOCKED_DOMAINS ,ALLOW_LOCALNETWORKS

And when I want to find the introduction of the app.ini, I find it's the example:

;; Allowed domains for migrating, default is blank. Blank means everything will be allowed.
;; Multiple domains could be separated by commas.
;; Wildcard is supported: "github.com, *.github.com"
;ALLOWED_DOMAINS =
;;
;; Blocklist for migrating, default is blank. Multiple domains could be separated by commas.
;; When ALLOWED_DOMAINS is not blank, this option has a higher priority to deny domains.
;; Wildcard is supported.
;BLOCKED_DOMAINS =

but when I configure as blow, it's still fail.

ALLOWED_DOMAINS =
BLOCKED_DOMAINS =

and when I change it as:

ALLOWED_DOMAINS = *
BLOCKED_DOMAINS =

and now, it can migrate successful.

Gitea Version

1.16.8

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

I run gitea with docker-compose, and the image is v1.16.8

Database

PostgreSQL

Originally created by @soyozhang on GitHub (Jul 12, 2022). ### Description I run gitea with docker ,and when I want to migrate project from git, It shows fail and needs me to configure the `migrations-ALLOWED_DOMAINS,BLOCKED_DOMAINS ,ALLOW_LOCALNETWORKS` And when I want to find the introduction of the `app.ini`, I find it's the example: ``` ;; Allowed domains for migrating, default is blank. Blank means everything will be allowed. ;; Multiple domains could be separated by commas. ;; Wildcard is supported: "github.com, *.github.com" ;ALLOWED_DOMAINS = ;; ;; Blocklist for migrating, default is blank. Multiple domains could be separated by commas. ;; When ALLOWED_DOMAINS is not blank, this option has a higher priority to deny domains. ;; Wildcard is supported. ;BLOCKED_DOMAINS = ``` but when I configure as blow, it's still fail. ``` ALLOWED_DOMAINS = BLOCKED_DOMAINS = ``` and when I change it as: ``` ALLOWED_DOMAINS = * BLOCKED_DOMAINS = ``` and now, it can migrate successful. ### Gitea Version 1.16.8 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? I run gitea with docker-compose, and the image is v1.16.8 ### Database PostgreSQL
GiteaMirror added the issue/needs-feedback label 2025-11-02 08:32:17 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Jul 12, 2022):

It will be fixed by #20327 Working on it, need more thoughts.

@wxiaoguang commented on GitHub (Jul 12, 2022): ~~It will be fixed by #20327~~ Working on it, need more thoughts.
Author
Owner

@wxiaoguang commented on GitHub (Jul 12, 2022):

It's not a bug (for most cases), see https://github.com/go-gitea/gitea/pull/20328

I think what you need is ALLOW_LOCALNETWORKS (for non-github), or are you using a proxy?

If you are using a proxy and the DNS resolver doesn't work in docker, the logic should be changed.

If your proxy (or VPN) returns fake IPs for github, then that's another story, you still need ALLOW_LOCALNETWORKS

Feel free to provide more clues.

@wxiaoguang commented on GitHub (Jul 12, 2022): It's not a bug (for most cases), see https://github.com/go-gitea/gitea/pull/20328 I think what you need is ALLOW_LOCALNETWORKS (for non-github), or are you using a proxy? If you are using a proxy and the DNS resolver doesn't work in docker, the logic should be changed. If your proxy (or VPN) returns fake IPs for github, then that's another story, you still need ALLOW_LOCALNETWORKS Feel free to provide more clues.
Author
Owner

@wxiaoguang commented on GitHub (Jul 14, 2022):

https://github.com/go-gitea/gitea/pull/20328 has been merged.

If you still have questions, please provide more clues.

@wxiaoguang commented on GitHub (Jul 14, 2022): https://github.com/go-gitea/gitea/pull/20328 has been merged. If you still have questions, please provide more clues.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9211