git可以在远程服务器上使用不同的区域设置吗?

时间:2013-10-15 01:00:09

标签: git localization gitolite

我在远程服务器上运行gitolite(在English_US中),我的一台计算机使用带有es_MX(español,墨西哥)的git作为语言环境访问它。每次我访问服务器时,都会给我一个错误:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_PAPER = "es_MX.UTF-8",
    LC_ADDRESS = "es_MX.UTF-8",
    LC_MONETARY = "es_MX.UTF-8",
    LC_NUMERIC = "es_MX.UTF-8",
    LC_TELEPHONE = "es_MX.UTF-8",
    LC_IDENTIFICATION = "es_MX.UTF-8",
    LC_MEASUREMENT = "es_MX.UTF-8",
    LC_TIME = "es_MX.UTF-8",
    LC_NAME = "es_MX.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

有没有办法告诉git只在连接到gitolite时使用en_US?

修改 我已经尝试了this question的答案,但这只会更改本地语言,并且不会影响错误。

1 个答案:

答案 0 :(得分:0)

这可能意味着locale aren't properly set up on your gitolite server

$ sudo locale-gen
$ sudo dpkg-reconfigure locales

和/或your sshd doesn't accept the LANG environment variable (/etc/ssh/sshd_config)

AcceptEnv LANG LC_*