在docker中试图svn checkout,结果因为有中文目录报错
[root@6f4912735213 ~]# svn co https://localhost/svn/repos
svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LANG is zh_CN.UTF-8
svn: warning: please check that your locale name is correct
Authentication realm: <https://localhost:443> SVN Repositories
Password for 'zpadm': *********
svn: E000022: Can't convert string from 'UTF-8' to native encoding:
svn: E000022: /root/repos/2020{U+4E2D}{U+5E73}{U+8FC1}{U+79FB}
解决办法:
[root@1ff78526f0d8 /]# export LC_ALL=en_US.UTF-8
[root@1ff78526f0d8 /]# locale
LANG=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
[root@1ff78526f0d8 /]# svn co https://localhost/svn/repos
Error validating server certificate for 'https://localhost:443':
- The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
- The certificate hostname does not match.
Certificate information:
- Hostname: hwt
- Valid: from Jan 1 13:25:32 2021 GMT until Dec 30 13:25:32 2030 GMT
- Issuer: hwt, KJB, PSBCGX, NN, Guangxi, CN(pay2k@126.com)
- Fingerprint: 58:DA:F5:8E:52:B6:A9:00:97:29:16:3C:BD:86:BD:94:B8:5B:DC:75
(R)eject, accept (t)emporarily or accept (p)ermanently? p
Authentication realm: <https://localhost:443> SVN Repositories
Password for 'root':
Authentication realm: <https://localhost:443> SVN Repositories
Username: zpadm
Password for 'zpadm': *********
A repos/2020中平迁移
A repos/2020中平迁移/项目文档
A repos/2020中平迁移/项目文档/总结和计划
A repos/LanguagePack_1.14.0.28885-x64-zh_CN.msi
A repos/TortoiseSVN-1.14.0.28885-x64-svn-1.14.0.msi
Checked out revision 5.
[root@1ff78526f0d8 /]#
或者:export LANG=en_US.UTF-8
[docker@yet svn]$ cat docker-compose.yml
version: '3'
services:
svnarch:
image: svnarch:1.0
ports:
- 8443:443
- 3691:3690
restart: always
tty: "true"
command: /run.sh
volumes:
- /data/compose/svn/repos:/home/svn/repositories/repos
container_name: svnarch
environment:
LANG: en_US.UTF-8