Search This Blog

Showing posts with label gitolite. Show all posts
Showing posts with label gitolite. Show all posts

Friday, June 17, 2022

fix gitolite perl error: rebuild locales

I run gitolite3 on a Debian 10 Server. Got this error when try to push from etckeeper by git push:
remote: perl: warning: Setting locale failed.
remote: perl: warning: Please check that your locale settings:
remote:         LANGUAGE = (unset),
remote:         LC_ALL = (unset),
remote:         LANG = "en_CA.UTF-8"
remote:     are supported and installed on your system.
remote: perl: warning: Falling back to the standard locale ("C").
Spent a lot of time try to set the LANGUAG, LC_ALL and LANG on the git client side. None of them works. End up rebuild locales on the gitolite3 host server:
sudo locale-gen en_US en_US.UTF-8
sudo dpkg-reconfigure locales

Friday, March 13, 2015

Move Rebuild the Gitolite server

Here is how I moved or rebuild the gitolite server.

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]

  1. Make sure generate ssh key before you install gitolite3.

  2. Install gitolite3.


  3. # apt-get update
    # apt-get install gitolite3

    It will asking you for the public key.

  4. Clone the gitolite-admin somewhere.

  5. # git clone gitolite3@192.168.1.3:gitolite-admin

  6. copy the gitolite-adminconfgitolite.conf from old gitolite-admin repo to new gitolite-admin repo.

  7. Be careful of the admin for repo gitolite-admin.
    Make sure you have the key for the permission.

  8. copy the keys gitolite-adminkeydir* from old gitolite-admin repo to new gitolite-admin repo.


  9. copy all the repos from the old server to new server into a temp folder:.

  10. # scp -r root@192.168.1.2:/home/git/repositories /tmp

  11. Drop the gitolite-admin and any other retired repo, then move them into the new gitolite3 repository folder:.

  12. # rm -rf /tmp/repositories/gitolite-admin.git/
    # rm -rf /tmp/repositories/testing.git/

    # mv /tmp/repositories/* /var/lib/gitolite3/repositories/

  13. Make sure the files end up with the right ownership and permissions; if not, chown/chmod them..

  14. I found most easy way to do it run scp by gitolite3 user.

  15. Push the changes on the new gitolite-admin repo:.

  16. # git add keydir/
    # git commit -a
    # git push

    And you are all set.