repo init 字符编码导致的出错问题
repo init -u ssh://abc@192.168.1.9:29418/android/platform/vendor/test/sdk/abc/manifests -b master --repo-url="ssh://abc@192.168.1.19:29418/android/git-repo"
出错信息如下:
File "/home/gchen/work/abc/.repo/repo/git_config.py", line 299, in _ReadGit
for line in d.decode('utf-8').rstrip('\0').split('\0'): # pylint: disable=W1401
File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x93 in position 10: invalid start byte
解决的方法:
更改/home/gchen/work/abc/.repo/repo/git_config.py如下
d.decode('utf-8','ignore').rstrip('\0').split('\0')