Closed
Description
Description
I tried to migrate a git repository from a bare git server to gitea, (both are on my LAN). I use the feature "Migrate a repository only from any Git service.", but it failed, and the gitea webpage shows that:
Migrating from git://10.42.1.55/Obj.268.git failed.
migration failed: clone error: exit status 128 - fatal:
unable to look up luke:xxxxxx@10.42.1.55 (port 9418)
(Name does not resolve)
The gitea container log shows that:
2025/04/24 21:24:28 ...ices/task/migrate.go:60:func1() [E] runMigrateTask[3] by DoerID[1] to RepoID[4] for OwnerID[1] failed: migration failed: clone error: exit status 128 - fatal: unable to look up luke:xxxxxx@10.42.1.55 (port 9418) (Name does not resolve)
2025/04/24 21:24:28 ...ervices/task/task.go:53:handler() [E] Run task failed: migration failed: clone error: exit status 128 - fatal: unable to look up luke:xxxxxx@10.42.1.55 (port 9418) (Name does not resolve)
The source git server (10.42.1.55) does not run any services like gitlab, gitea, only git and git-daemon.
I have added
[migrations]
ALLOWED_DOMAINS = 127.0.0.1, 10.42.1.55
ALLOW_LOCALNETWORKS = true
to /data/gitea/conf/app.ini
.
What should I do to achieve a successful migration?
Thank you very much.
Gitea Version
1.23.7
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
Git Version
2.47.2
Operating System
AlmaLinux 9.5
How are you running Gitea?
I run from docker 28.1.1, the docker-compose.yml
file is:
version: '3.9'
services:
server:
container_name: gitea
image: gitea/gitea:1.23.7
ports:
- "3000:3000"
- "222:22"
networks:
- gitea
volumes:
- ~/Docker_Data/Gitea/gitea_data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=db:5432
- GITEA__database__NAME=gitea_db
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=xxxxxx
restart: always
depends_on:
- db
db:
container_name: postgres_ea
image: postgres:17.4
ports:
- '5432:5432'
networks:
- gitea
volumes:
- ~/PGdata:/var/lib/postgresql/data
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=xxxxxx
- POSTGRES_DB=gitea_db
# restart: always
networks:
gitea:
external: false
Database
PostgreSQL
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
wxiaoguang commentedon Apr 24, 2025
How do you serve that git repo? Usually it should be
ssh://git@server/repo.git
orhttp://server/repo.git
, are you suregit://10.42.1.55/Obj.268.git
is right?IIRC only
http://server/repo.git
is supported.eeyrjmr commentedon Apr 24, 2025
if it is just a bare repository, you could copying it into the gitea-repositories directory (some subdirectory as you see fit) and from the admin webui "adopt" the bare repository
lunny commentedon Apr 24, 2025
Onlyhttp/https
should have been supported at the moment.http/https/git
should have been supported but the problem is the DNS or network.Luke-li-Chen commentedon Apr 25, 2025
When I use a ssh:// url, the webpage said that:
The provided URL is invalid. Only http(s):// or git:// locations can be used for mirroring.
wxiaoguang commentedon Apr 25, 2025
IIRC "git" is for a local repo on local system only. I do not think it is well supported or should be used.
So you still need to use "http" or "https", or just use "adopt" (#34280 (comment))
lunny commentedon Apr 25, 2025
Protocol
ssh
haven't been supported yet.