Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Import 300+ git repositories to an altassian project

Francois Gervais May 14, 2014

Hi,

We are evaluating Stash to help us manage our git repositories. Right now we have a single projet which is using a little over 300 git repositories. We'd like to import them in our Stash project. How can this be done?

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 14, 2014

Hi Francois,

There is no out-of-the box support for bulk importing of repositories just yet, but each of the steps in the process is fully scriptable. The basic steps are as follows:

  • Create the project and repositories in Stash. The repositories will be empty.
  • Clone the repositories from your current git server.
  • Push each of the repositories to their Stash equivalent.

We have an experimental command-line importer that supports bulk imports of a set of repositories on the local disk. You could experiment with this importer or use it as a starting point and customize it to your situation: https://bitbucket.org/atlassianlabs/stash-importer/src/ca40b471af1af673401900175a7ac5777ae8f960/src/main/resources/?at=master

If you decide to script it yourself, have a look at the following documentation:

  • Mirror an existing git repository (for the steps on how to import an existing git repository)
  • Stash REST api for the commands to create a new (empty) repository in Stash. (Make sure you provide username/password for a user that has PROJECT_ADMIN permission on the project where the repositories are to be created)

Cheers,

Michael

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events