https://github.com/farthinder/bitbuckettogitea
Migrate Bitbucket Projects and Repos to Gitea
https://github.com/farthinder/bitbuckettogitea
Last synced: about 2 months ago
JSON representation
Migrate Bitbucket Projects and Repos to Gitea
- Host: GitHub
- URL: https://github.com/farthinder/bitbuckettogitea
- Owner: farthinder
- Created: 2024-01-03T11:44:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-03T11:45:43.000Z (over 1 year ago)
- Last Synced: 2025-04-11T22:10:00.697Z (about 2 months ago)
- Language: Groovy
- Size: 7.81 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Background & Use case
Migrates Bitbucket Server/DC projects and repos to Gitea.
The native Gitea migrator does not currently handle LFS files but this migrator does.The migration can be run several time, if the destination repo already exists a push will still be attempted and if nothing has
changed in the destination the push should succeed.## Requirements:
* git and git-lfs installed and available with the env PATH variable
* Groovy
* Ideally execute this in en environment that uses the pom.xml file to resolve dependencies, such as Intellij## Known issues:
1. Cloning empty bitbucket repos does not fail gracefully
2. Currently, cant handle a collision between a bbProject.name and an existing giteaUser.name## What it does
### In Bitbucket:
All repos available to the supplied user will be checked out including all branches, tags (mirror) and LFS resources to a temporary directory
### In gitea:
If it doesn't already exist an organization is created with the following metadata mappings:
* description: bbRepo/bbProject/description
* fullName: bbRepo/bbProject/name
* repoAdminChangeTeamAccess: true
* username: bbRepo/bbProject/name
* visibility: privateIf it doesn't already exist a repo is created with the following metadata mappings:
* owner: bbRepo/bbProject/name
* name: bbRepo/name
* description: bbRepo/description#### Note:
New gitea repos and orgs will have the following characters in their userNames replaced by "_"
" " (space)
","The local temp file with all branches/tags/lfs-resources are pushed to the new gitea repo.
The Temp file is deleted