5

I have the gitolite and currently created test repositories and configured user rights and all works fine.

What I want now is I have migrated a cvs repository to git by using git cvsimport. I have the newly migrated repository. How I can configure this repository via gitolite and configure users for this repository?

Kindly guide me in right directions!!

thillaiselvan
  • 637
  • 6
  • 18

1 Answers1

10

You need to clone the gitoite-adin repo, and declare a new repo:
See "adding and removing repos"

Once done, you would add to your exisintg local git repo (the one with the CVS import in it) a new remote:

git remote add gitolite git@server:to

(you can name the remote origin if you want)

And then you would push your local repo to the gitolite-managed one:

git push gitolite master # to initialize the remote repo with master branch
git push gitolite --all # to push all branches
git push gitolite --tags # to push all tags

(git push --all as mentioned in "With GitHub how do I push all branches when adding an existing repo?")

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • @VonC... I have done these things already for my test repositories(created freshly). consider that I have a project called phone_book repository in CVS. I have migrated it to git. Now what I can do to configure this repository and add user rights to this repository??? – thillaiselvan Apr 27 '12 at 05:55
  • 1
    @thillaiselvan the thing is: this configuration is *declared* in the `gitolite.conf` file of the `gitolite-admin` repo. Once you have declared the users (and added their public ssh keys in said `gitolite-admin` repo) and push back the `gitolite-admin` repo, then you have an empty repo ready to get all the history of your current local CVS-imported Git repo (as described in my answer). – VonC Apr 27 '12 at 05:59
  • 1
    @thillaiselvan For declaring / adding new users: http://sitaramc.github.com/gitolite/users.html – VonC Apr 27 '12 at 05:59
  • I have the cvs to git imported repository in my local machine. And then created the repository via gitolite. After that cloned the newly created repository in local. Next what needs to be done to push the migrated repository? – thillaiselvan Apr 27 '12 at 06:52
  • 1
    @thillaiselvan you don't need to clone the newly (created by gitolite) repo. You can directly add a reference, from your existing repo (the one with the CVS import content) to the newly gitolite one (which is empty) and push to it. – VonC Apr 27 '12 at 06:56