My old gitolite version is 1.x.
Mark IP:[192.168.1.2]
Clone your old gitolite-admin repo to somewhere.
The new gitolite I install on Debian 7 Wheezy through backports.
Mark IP:[192.168.1.3]
- Make sure generate ssh key before you install gitolite3.
- Install gitolite3.
- Clone the gitolite-admin somewhere.
- copy the gitolite-adminconfgitolite.conf from old gitolite-admin repo to new gitolite-admin repo.
- copy the keys gitolite-adminkeydir* from old gitolite-admin repo to new gitolite-admin repo.
- copy all the repos from the old server to new server into a temp folder:.
- Drop the gitolite-admin and any other retired repo, then move them into the new gitolite3 repository folder:.
- Make sure the files end up with the right ownership and permissions; if not, chown/chmod them..
- Push the changes on the new gitolite-admin repo:.
# apt-get update
# apt-get install gitolite3
It will asking you for the public key.
# git clone gitolite3@192.168.1.3:gitolite-admin
Be careful of the admin for repo gitolite-admin.
Make sure you have the key for the permission.
# scp -r root@192.168.1.2:/home/git/repositories /tmp
# rm -rf /tmp/repositories/gitolite-admin.git/
# rm -rf /tmp/repositories/testing.git/
# mv /tmp/repositories/* /var/lib/gitolite3/repositories/
I found most easy way to do it run scp by gitolite3 user.
# git add keydir/
# git commit -a
# git push
And you are all set.
No comments:
Post a Comment