Skip to content

Instantly share code, notes, and snippets.

@pzxbc
Created November 2, 2018 03:42
Show Gist options
  • Save pzxbc/0b05873e50b873a3e423340407c9fe74 to your computer and use it in GitHub Desktop.
Save pzxbc/0b05873e50b873a3e423340407c9fe74 to your computer and use it in GitHub Desktop.
gitlab问题

Windows上一般是GBK编码的,但是gitlab-runner默认是utf-8的编码。

在Windows上的runner的输出如果包含中文就会出现乱码,解决方法:在script执行前添加codepage转化的命令

chcp 65001

但是Windows上的有些命令时不支持utf8编码的,比如xcopy...,所以即使切换的编码,也会有部分命令出现乱码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment