Categories
Coding

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.

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

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 😀

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.