假如使用http访问仓库,用户配置的pre-commit钩子里面如果有中文,可能会出现“Error output could not be translated from the native locale to UTF-8.”的错误提示
用户如果使用svnserver访问仓库,钩子不会有问题。
导致这个错误的原因是因为http服务本身有一个编码的设置,所以如果http的编码没有设置好,钩子返回的中文就会导致编码错误,具体解决方法如下:
修改/etc/httpd/conf/httpd.conf文件
vim /etc/httpd/conf/httpd.conf
往文件中添加内容:

<IfModule mod_dav_fs.c>
# Location of the WebDAV lock database.
DAVLockDB /var/lib/dav/lockdb
SVNUseUTF8 On
</IfModule>

保存

service httpd restart

参考博客:http://www.cnblogs.com/lavezhang/p/7219398.html

相关文章:

  • 2021-06-07
  • 2022-12-23
  • 2022-01-17
  • 2021-07-27
  • 2021-08-04
猜你喜欢
  • 2021-05-26
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
  • 2021-12-04
相关资源
相似解决方案