Import bitbucket to gitea #11669

Closed
opened 2025-11-02 09:44:06 -06:00 by GiteaMirror · 13 comments
Owner

Originally created by @ware32 on GitHub (Sep 18, 2023).

Feature Description

Is it possible to import a bitbucket repository to gitea? I cant find information about this.
Thanks in advance

Screenshots

No response

Originally created by @ware32 on GitHub (Sep 18, 2023). ### Feature Description Is it possible to import a bitbucket repository to gitea? I cant find information about this. Thanks in advance ### Screenshots _No response_
GiteaMirror added the type/proposal label 2025-11-02 09:44:06 -06:00
Author
Owner

@lunny commented on GitHub (Sep 18, 2023):

For repositories, you can use git to import them.

@lunny commented on GitHub (Sep 18, 2023): For repositories, you can use git to import them.
Author
Owner

@ware32 commented on GitHub (Sep 18, 2023):

Thanks, is there any example or similar?

@ware32 commented on GitHub (Sep 18, 2023): Thanks, is there any example or similar?
Author
Owner

@delvh commented on GitHub (Sep 18, 2023):

image
image

@delvh commented on GitHub (Sep 18, 2023): ![image](https://github.com/go-gitea/gitea/assets/51889757/1bc49842-84e5-48e2-b558-31a88d9def36) ![image](https://github.com/go-gitea/gitea/assets/51889757/fce69978-4ae7-4e8c-95dd-c69470a75c27)
Author
Owner

@ware32 commented on GitHub (Sep 18, 2023):

I get "authentication failed: Clone: exit status 128 - remote: Invalid credentials fatal: Authentication failed"
And the credentials are OK

@ware32 commented on GitHub (Sep 18, 2023): I get "authentication failed: Clone: exit status 128 - remote: Invalid credentials fatal: Authentication failed" And the credentials are OK
Author
Owner

@delvh commented on GitHub (Sep 18, 2023):

And the Git repo URL is correct?
The URL should end in .git (if bitbucket behaves like GitHub/GitLab/Gitea)

@delvh commented on GitHub (Sep 18, 2023): And the Git repo URL is correct? The URL should end in `.git` (if bitbucket behaves like GitHub/GitLab/Gitea)
Author
Owner

@ware32 commented on GitHub (Sep 18, 2023):

This would be correct? must it be the username in the url?
https://USERNAME@bitbucket.org/trotecuto/bodega.git

@ware32 commented on GitHub (Sep 18, 2023): This would be correct? must it be the username in the url? https://USERNAME@bitbucket.org/trotecuto/bodega.git
Author
Owner

@ware32 commented on GitHub (Sep 18, 2023):

And the Git repo URL is correct? The URL should end in .git (if bitbucket behaves like GitHub/GitLab/Gitea)

are you sure bitbucket allows this migration?

@ware32 commented on GitHub (Sep 18, 2023): > And the Git repo URL is correct? The URL should end in `.git` (if bitbucket behaves like GitHub/GitLab/Gitea) are you sure bitbucket allows this migration?
Author
Owner

@lunny commented on GitHub (Sep 18, 2023):

And the Git repo URL is correct? The URL should end in .git (if bitbucket behaves like GitHub/GitLab/Gitea)

are you sure bitbucket allows this migration?

If you can git clone via that address, it should be. Because that means bitbucket supports git smart HTTP protocols which is a standard protocol.

@lunny commented on GitHub (Sep 18, 2023): > > And the Git repo URL is correct? The URL should end in `.git` (if bitbucket behaves like GitHub/GitLab/Gitea) > > are you sure bitbucket allows this migration? If you can git clone via that address, it should be. Because that means bitbucket supports git smart HTTP protocols which is a standard protocol.
Author
Owner

@andrewimeson commented on GitHub (Sep 18, 2023):

The generic Git importer should work.

If you want to keep PR history and other non-git metadata, that isn't directly supported. I used an intermediary GitLab instance which does have a BitBucket importer and moved all the repositories to GitLab and then to Gitea to keep PR history. It doesn't work perfectly, the PR comments on lines of code don't have the context, but it was better than losing that history.

@andrewimeson commented on GitHub (Sep 18, 2023): The generic Git importer should work. If you want to keep PR history and other non-git metadata, that isn't directly supported. I used an intermediary GitLab instance which does have a BitBucket importer and moved all the repositories to GitLab and then to Gitea to keep PR history. It doesn't work perfectly, the PR comments on lines of code don't have the context, but it was better than losing that history.
Author
Owner

@ware32 commented on GitHub (Sep 18, 2023):

The generic Git importer should work.

If you want to keep PR history and other non-git metadata, that isn't directly supported. I used an intermediary GitLab instance which does have a BitBucket importer and moved all the repositories to GitLab and then to Gitea to keep PR history. It doesn't work perfectly, the PR comments on lines of code don't have the context, but it was better than losing that history.

Using the generic git importer I always get the "invalid credentials error".
In bitbucket I login using my gmail account. In the git importer, wich username and password must I use?

thanks

@ware32 commented on GitHub (Sep 18, 2023): > The generic Git importer should work. > > If you want to keep PR history and other non-git metadata, that isn't directly supported. I used an intermediary GitLab instance which does have a BitBucket importer and moved all the repositories to GitLab and then to Gitea to keep PR history. It doesn't work perfectly, the PR comments on lines of code don't have the context, but it was better than losing that history. Using the generic git importer I always get the "invalid credentials error". In bitbucket I login using my gmail account. In the git importer, wich username and password must I use? thanks
Author
Owner

@JakobDev commented on GitHub (Sep 18, 2023):

In the git importer, wich username and password must I use?

The same you use wit git clone

@JakobDev commented on GitHub (Sep 18, 2023): > In the git importer, wich username and password must I use? The same you use wit `git clone`
Author
Owner

@ware32 commented on GitHub (Sep 19, 2023):

In the git importer, wich username and password must I use?

The same you use wit git clone

It uses browser to authenticate, when invoking git clone it apperars a box to perform the browser authentication

@ware32 commented on GitHub (Sep 19, 2023): > > In the git importer, wich username and password must I use? > > The same you use wit `git clone` It uses browser to authenticate, when invoking git clone it apperars a box to perform the browser authentication
Author
Owner

@ware32 commented on GitHub (Sep 19, 2023):

Solved, without using user and password and using in the server name the token
Example:
https://x-token-auth:xxxxxxxxxxxxxxxx@bitbucket.org/xxxx/ccccc.git

@ware32 commented on GitHub (Sep 19, 2023): Solved, without using user and password and using in the server name the token Example: https://x-token-auth:xxxxxxxxxxxxxxxx@bitbucket.org/xxxx/ccccc.git
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11669