问题描述
我目前正在运行一个如此棘手的错误.我在 Windows 10 上运行 ddev.看来,问题是我的名字安德烈克劳斯",因为é"里面.过去它与 [path-to-project]/.ddev/docker-compose.environment.yaml 一起工作正常,将我的用户名设置为andrekraus"
版本:'3.6'服务:网络:建造:参数:用户名:andrekrausD b:建造:参数:用户名:andrekraus
但是从昨天开始,出现了新的挑战.当我输入 ddev start 时,它以:
$ ddev start正在启动 ddev-test-4....UnicodeDecodeError: 'utf-8' 编解码器无法解码位置 235 中的字节 0xe9:继续字节无效无法启动 ddev-test-4:无法启动 ddev-ssh-agent:无法运行 docker-compose [-f C:\Users\André Kraus/.ddev/.ssh-auth-compose-full.yaml -pddev-ssh-agent up --build --force-recreate -d], err='exit status 1', stdout='', stderr='.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in位置 235:无效的继续字节'
我尝试在我的 docker-compose.environment.yaml 中修复该问题
版本:'3.6'服务:网络:建造:参数:用户名:andrekrausD b:建造:参数:用户名:andrekrausddev-ssh-agent:建造:参数:用户名:andrekraus
但这没有任何影响.问题肯定出现在我的用户目录中的 C:\Users\André Kraus.ddev.ssh-auth-composer-full.yaml(屏幕截图)中,但我如何管理那里的设置?
修复 utf-8 问题:
覆盖 [path-to-project]/.ddev/docker-compose.env.yaml 中的名称:
版本:'3.6'服务:网络:建造:参数:用户名:andrekrausD b:建造:参数:用户名:andrekraus
然后在 ~/.ddev 中(在我的 Windows 示例中,它是 C:\Users\André Kraus.ddev )创建新文件 ssh-auth-compose.environment.yaml:
版本:'3.6'服务:ddev-ssh-agent:建造:参数:用户名:andrekraus
这解决了用户名的问题,但我没有让路径工作.所以目前我省略了 ddev-ssh-agent.
省略 ddev-ssh-agent
将我的配置添加到配置中,创建新文件[path-to-project]/.ddev/config.user.yaml:
omit_containers: [ddev-ssh-agent]
ddev 需要清除重启
所以在那之后,我遇到了一些问题,无法让它再次运行.我做了ddev poweroff
然后docker ps -a
.该列表显示了一些正在运行的容器,我不得不将它们全部停止(docker-compose down
在项目目录中),以便 docker ps -a
显示一个空列表.>
之后,ddev start
再次运行.
非常感谢@rfay的帮助!
I'm currently running in such a tricky error. I'm running ddev on Windows 10.It seems, the problem is my name "André Kraus", because of the "é" inside.In the past it works fine with a [path-to-project]/.ddev/docker-compose.environment.yaml, set my username to "andrekraus"
version: '3.6'
services:
web:
build:
args:
username: andrekraus
db:
build:
args:
username: andrekraus
But since yesterday, there occurs a new challenge. When I type in ddev start it ends up with:
$ ddev start
Starting ddev-test-4...
.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 235: invalid continuation byte
Failed to start ddev-test-4: failed to start ddev-ssh-agent: Failed to run docker-compose [-f C:\Users\André Kraus/.ddev/.ssh-auth-compose-full.yaml -p ddev-ssh-agent up --build --force-recreate -d], err='exit status 1', stdout='', stderr='.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 235: invalid continuation byte'
I tried to fix that in my docker-compose.environment.yaml with
version: '3.6'
services:
web:
build:
args:
username: andrekraus
db:
build:
args:
username: andrekraus
ddev-ssh-agent:
build:
args:
username: andrekraus
but this didn't effect anything.The problem occurs for sure in the C:\Users\André Kraus.ddev.ssh-auth-composer-full.yaml (screenshot) in my user directory, but how can I manage the settings there?
Fix the utf-8 Problem:
Overwrite the name in the [path-to-project]/.ddev/docker-compose.env.yaml:
version: '3.6'
services:
web:
build:
args:
username: andrekraus
db:
build:
args:
username: andrekraus
Then in ~/.ddev (in my example on Windows it is C:\Users\André Kraus.ddev ) create new the file ssh-auth-compose.environment.yaml:
version: '3.6'
services:
ddev-ssh-agent:
build:
args:
username: andrekraus
This solves the problem with the username, but I didn't get the path working. So at the moment, I omit the ddev-ssh-agent.
Omit the ddev-ssh-agent
Add my configuration to the config, create new file [path-to-project]/.ddev/config.user.yaml:
omit_containers: [ddev-ssh-agent]
Clear restart needed for ddev
So after that, I had some issues to get it working again. I did ddev poweroff
and then docker ps -a
. The list shows some containers running, I had to stop them all (docker-compose down
in the project directories) so that docker ps -a
shows an empty list.
After that, ddev start
works again.
Thank you so much @rfay for your help!
这篇关于docker ddev .UnicodeDecodeError: 'utf-8' 编解码器无法解码位置 235 中的字节 0xe9:继续字节无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!