Import git repositoy using git or ssh


We have installed the Bitbucket server and we want to import an existing git repository. Our git repository is installed on our own servers using the git protocol. To clone the project we use git://ourserver/project.git.

When we want to link our git repository to Bitbucket we must provide an url like HTTP(s)://. But we don't use the HTTP(s) protocol because we have installed everything locally. We can change it so that we can use ssh but this is still invalid.

Is it possible to import a local git repositoy using the git protocol?



1 answer

You should be able to just create a new empty repo on Bitbucket.

Then go to somewhere where you have the repo you want to import - it can just be a clone - and add the URL for that repo as a new remote, and then push to that remote

git remote add bitbucket <url>
git push bitbucket

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

673 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot