Disclaimer: This post is not related in any way to Microsoft’s recent acquisition of GitHub (I don’t really have a very strong opinion about it; although I hope that won’t affect us at all).
Next month, my GitHub annual subscription will end and I don’t want to renew it in order to reduce the high number of online services I currently pay for.
tl;dr: I’ll continue to use GitHub but not for private repositories.
There are many alternatives out there, but I’ve decided to migrate my private repositories to Bitbucket¹ (mainly because I’m used to using it at work²). The biggest obstacle is that they don’t provide any tool to import all the repos at once (we have to do the chore one by one…) so I’ve created a script³ to fill that gap. You’re welcome, Bitbucket
- Python 2.7
FromGithubToBitbucket.py script (don’t forget to make it executable using
- GitHub personal acces token (scopes needed: repo)
- Bitbucket app password ➡️ Bitbucket settings ➡️ App passwords (permissions needed: Repositories write)
- Bitbucket OAuth consumer ➡️ Bitbucket settings ➡️ OAuth ➡️ OAuth consumers (permissions needed: Repositories write&admin)
As you can see, we won’t expose any of our account passwords, so we can delete those temporary credentials afterwards.
- Fill in the credentials
- Setup what kind of repo do we want to import
- **Run the script **and follow the instructions
This article was originally published on Medium
 Even though some people think it’s the ugliest one
 Also, I tried Gitlab long time ago and IMO their website was running slow and sluggish. Perhaps they have solved this by now, IDK
 It has been tested under Linux/MacOS. What about Windows users? Well, can you tell me why you’re still using Windows?