my friend have a repository on Bitbucket and I want to copy that repository (for future reference so that if he delete that repository i would still have one copy) to my bitbucket account. I tried bare-cloning,mirror push and etc... but :(
may be I'm missing some set of commands
PS: repository type is git (not hg)
On GitHub.com, navigate to the main page of the repository. Under your repository name, click Settings. Under "Danger Zone", click Transfer. Read the information about transferring a repository, then type the name of the user or organization you'd like to transfer ownership of the repository to.
Clone a Bitbucket repositoryClick + in the global sidebar on the left, and under Get to work select Clone this repository. Select HTTPS from the menu in the upper-right (unless you've already set up your SSH keys). Copy the clone command.
The first time you clone a repository you are prompted to provide your Bitbucket username and password. Provide your account name as the username, and type the Bitbucket App password into the password field. After the authentication completes, the git clone operation proceeds.
Navigate to the repository you just cloned. Pull in the repository's Git Large File Storage objects. Mirror-push to the new repository. Push the repository's Git Large File Storage objects to your mirror.
Recently, I had to do this for multiple repositories. I found a better way than cloning the repo locally and pushing it to another remote(on Bitbucket).
Bitbucket provides import repository feature. It can be found under Repositories > Import Repository
Just provide https url of the repo and access credentials, and bitbucket will do the rest for you.
I know this is an old question but this method is easier and saves a lot of time. Hope this helps others in future.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With