Fixing perl errors when using gitolite + ssh + custom locales

If you have locale issues on a server, and your server is english only, this kind of issues can happen:

$ git push origin master
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_MESSAGES = "fr_FR.UTF-8",
	LC_COLLATE = "fr_FR.UTF-8",
	LC_CTYPE = "fr_FR.UTF-8",
	LANG = "en_US.utf8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Everything up-to-date

You might want to check your /etc/ssh/sshd_config and look at the AcceptEnv token.
On this ssh server, it was:

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

My locale environment was passed to the server, but the server doesn’t know about fr. Since i don’t want to install fr locales, just comment that line:

# Allow client to pass locale environment variables
# AcceptEnv LANG LC_*

Done.

If you like my work, tip me!

Facebook Twitter Delicious Reddit Digg

2 thoughts on “Fixing perl errors when using gitolite + ssh + custom locales

  1. Thanks. I didn’t realize that the perl errors that I was getting on pretty much every debian server were actually the fault of my misconfigured system :D

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">