Hi Gitea Developers,
When using repository migrations (mirroring) there is support for GitHub, that will offer to migrate not only the code, but also Issues, Pull Requests and similar by using the GitHub API to fetch the additional content.
Please make it possible to do the same also when not using the public GitHub, i.e. "github.com".
There are enterprise GitHub instances out there, typically something like "github.company.com" or so, that will work the same, but are some "isolated" GitHub.
Currently unfortunately only the code migration is possible from such enterprise GitHub instances.
Thank you and best regards
@coldcoff
Good idea. I added a comment to https://github.com/go-gitea/gitea/issues/8689.
This is not really a new platform / new migration.
As it is just "GitHub with different URLs" (and the software version running there is probably a bit older than the public GitHub) the task is hopefully only to make some hardcoded GitHub URLs configurable/extendable.
So it might be a lower hanging fruit.
If the only difference between public github and enterprise github is the domain? I would like to send a PR to support enterprise gihtub but I cannot access any enterprise github instance and could not test it. If anyone would like to help testing, please let me know.
@lunny trial can be found here: https://enterprise.github.com/trial
Is this solved by #12619 ?
Probably. Is there some test / nghtly build already I can use to try that? I saw that's just merged to master.
You can use https://try.gitea.io (can make repo private and delete after testing)
Nope, unfortunately not. That one is not able to connect to our companies enterprise GitHub.
Hmm, it may be worth spinning up a local instance of Gitea to see if it generated any errors trying to migrate (the logs on try would probably be a nightmare to parse through)
Theoretically it should use the same API as GitHub, so I'm curious where it's choking.
If I have some extra time I might try testing with the trial of GH Enterprise.
Thanks for checking! 馃檪
Please let me know when there is any "-rc1" or "nightly" or so for me to test, if you need that.
https://dl.gitea.io/gitea/master always has the latest build of the master branch.
We also provide a docker with the tag latest that always has the latest version of Gitea
I downloaded the lastest trunk and gave it a try.
The page says that I need an access token to migrate additional stuff, so I entered some.
Although I specified a path to our enterprise instance:
The migration failed and I saw in the log:
2020/09/14 13:31:49 modules/task/task.go:51:handle() [E] Run task failed: GET https://api.github.com/repos/COMPANY/REPO: 401 Bad credentials []
So obviously the auth is tried against (hardcoded?) public GitHub, not the enterprise one?
Could you try to remove the username on your URL?
Was coming from that :-) Same.
The "Run task" goes against: https://api.github.com/... instead of https://api.github.COMPANY.com/
Aha, I believe I know where the issue is. We are creating a new client rather than a new enterprise client.
I will try to get a PR in sometime today. As noted in the go-github docs, the two clients behave the exact same, they just have different baseURL
and uploadURL
properties.
This is (hopefully) fixed by https://github.com/go-gitea/gitea/pull/12863
I will try spinning up a trial version of GHE to test it soon:tm:
Most helpful comment
Good idea. I added a comment to https://github.com/go-gitea/gitea/issues/8689.
This is not really a new platform / new migration.
As it is just "GitHub with different URLs" (and the software version running there is probably a bit older than the public GitHub) the task is hopefully only to make some hardcoded GitHub URLs configurable/extendable.
So it might be a lower hanging fruit.