Migrate through API gives `` #8066

Closed
opened 2025-11-02 07:52:46 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @kad-beumer on GitHub (Nov 2, 2021).

Gitea Version

latest Docker image

Git Version

latest Docker image

Operating System

latest Docker image

How are you running Gitea?

latest Docker image

Database

PostgreSQL

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Description

When migrating a repository from Github with "pull_request": true. I get an error saying: MigrateRepository: 'PullRequests' not supported. When running the migration throug the UI everything goes as expected.

Data:

{
  "auth_password": "*********************",
  "auth_username": "username",
  "clone_addr": "https://github.com/my-org/my-repo",
  "private": true,
  "pull_requests": true,
  "releases": true,
  "repo_name": "my-repo",
  "repo_owner": "richard",
  "service": "git",
  "wiki": true
}

Logs:

2021/11/02 17:27:01 Started POST /api/v1/repos/migrate?token=******** for 172.22.0.1:37090
2021/11/02 17:27:18 ...i/v1/repo/migrate.go:242:handleMigrateError() [E] MigrateRepository: 'PullRequests' not supported
2021/11/02 17:27:18 ...i/v1/repo/migrate.go:197:func1() [E] DeleteRepository: repository does not exist [id: 190, uid: 14, owner_name: , name: ]
2021/11/02 17:27:18 Completed POST /api/v1/repos/migrate?token=********  500 Internal Server Error in 17.6840749s

What is going wrong?

Screenshots

No response

Originally created by @kad-beumer on GitHub (Nov 2, 2021). ### Gitea Version latest Docker image ### Git Version latest Docker image ### Operating System latest Docker image ### How are you running Gitea? latest Docker image ### Database PostgreSQL ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Description When migrating a repository from Github with `"pull_request": true`. I get an error saying: `MigrateRepository: 'PullRequests' not supported`. When running the migration throug the UI everything goes as expected. Data: ``` { "auth_password": "*********************", "auth_username": "username", "clone_addr": "https://github.com/my-org/my-repo", "private": true, "pull_requests": true, "releases": true, "repo_name": "my-repo", "repo_owner": "richard", "service": "git", "wiki": true } ``` Logs: ``` 2021/11/02 17:27:01 Started POST /api/v1/repos/migrate?token=******** for 172.22.0.1:37090 2021/11/02 17:27:18 ...i/v1/repo/migrate.go:242:handleMigrateError() [E] MigrateRepository: 'PullRequests' not supported 2021/11/02 17:27:18 ...i/v1/repo/migrate.go:197:func1() [E] DeleteRepository: repository does not exist [id: 190, uid: 14, owner_name: , name: ] 2021/11/02 17:27:18 Completed POST /api/v1/repos/migrate?token=******** 500 Internal Server Error in 17.6840749s ``` What is going wrong? ### Screenshots _No response_
GiteaMirror added the issue/needs-feedback label 2025-11-02 07:52:46 -06:00
Author
Owner

@lunny commented on GitHub (Nov 3, 2021):

{
"service": "github"
}

@lunny commented on GitHub (Nov 3, 2021): { "service": "github" }
Author
Owner

@kad-beumer commented on GitHub (Nov 3, 2021):

That made do 1 step forward. Thanks.

But it now gives the error:
{"message":"GET https://api.github.com/repos/my-org/my-reop: 404 Not Found []","url":"http://localhost:3000/api/swagger"}

Its a private repo but my PAT has access to it.
Any advise?

@kad-beumer commented on GitHub (Nov 3, 2021): That made do 1 step forward. Thanks. But it now gives the error: `{"message":"GET https://api.github.com/repos/my-org/my-reop: 404 Not Found []","url":"http://localhost:3000/api/swagger"}` Its a private repo but my PAT has access to it. Any advise?
Author
Owner

@lunny commented on GitHub (Nov 4, 2021):

You should use auth_token if you are using a token with Gitea API.

@lunny commented on GitHub (Nov 4, 2021): You should use `auth_token` if you are using a token with Gitea API.
Author
Owner

@kad-beumer commented on GitHub (Nov 5, 2021):

Thanks. That fixed it.

@kad-beumer commented on GitHub (Nov 5, 2021): Thanks. That fixed it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8066