Import Repository From Github to Bitbucket and Bitbucket to Github (Repository will be Imported as Private)
- NodeJS and NPM
-
Download or Clone This Repo Click Here
-
Open a terminal In The Cloned Directory
-
Run
$ npm install
-
Rename the
example.env
file to.env
-
Generate a Github Personal Access Token with Scope
repo
. Copy it and replace with thexxx
in.env
GITHUB_ACCESS_TOKEN="xxx"
- Learn Here How to Create Your Github Personal Access Token
-
Replace the
username
in.env
BITBUCKET_USERNAME="username"
- Click Here To Know Your Bitbucket Username
-
Create A App Password in Bitbucket with Permission
Repositories
. Copy it and replace with thexxx
in.env
BITBUCKET_ACCESS_TOKEN="xxx"
- Learn Here How to Create A App Password in Bitbucket
-
Run
$ npm start
It will promt to choose a site(Github/Bitbucket) from which you want to import the repository.
-
After choosing a site it will fetch your repositories. Use
arrow
keys to go up and down, select the repos withspace
key and hit enter to import the repository to Other site(Bitbucket/Github). -
You Can also type your repository name to search in the list
-
After Import Task Complete it Will Ask You If You Want to Import More From The Selected Site
-
If You Choose Yes(press y) then it will ask to choose the page from pagination
-
And The Process will repeat.
-
If You Can't Find A Repo in the first page/list, it is in other pages. To Directly go to other pages don't select any repo in the first list and hit enter and it will ask you If You Want to Import More
press y
then select the next page
-
Click Generate Token
-
Copy and Save The Generated Token for Future Uses
-
Go to Bitbucket Account > ACCESS MANAGEMENT > App passwords > Create app password
-
**Give a label. Tick all option under repositories **
-
Click Create
-
Copy The Password and Save it for Future Uses
- Fetch Repo From Next Pages While Typing/Searching
- PRs are Welcome 😊