YAMLException: bad indentation of a mapping entry (106:13) 103 | ## Docs: https://hexo.io/docs/one-command-d ... 104 | deploy: 105 | type:git 106 | repository: git@github.com:Cici-Cici/laij ... -------------------^ 107 | branch: master
时间: 2023-08-18 12:57:39 浏览: 75
这个错误是由于 YAML 文件中的缩进问题导致的。根据错误提示,问题出现在第106行的第13个字符位置。在这个位置上,键 `repository` 的缩进不正确,导致 YAML 解析器无法正确识别该键和其对应的值。
正确的缩进应该是在 `deploy` 下面增加四个空格,使其与上一行的 `type` 对齐。修改后的代码如下:
```yaml
deploy:
type: git
repository: git@github.com:Cici-Cici/laij ...
branch: master
```
请注意,YAML 对缩进非常敏感,因此确保在编辑 YAML 文件时保持一致的缩进风格,一般建议使用两个空格或四个空格作为缩进。
相关问题
YAMLException: bad indentation of a mapping entry (105:23) 102 | # Deployment 103 | ## Docs: https://hexo.io/docs/one-command-deployment 104 | deploy: 105 | type: git repository: git@github.com:Cici-Cici/laij ...
这个错误是由于 YAML 文件中的缩进问题导致的。根据错误提示,问题出现在第105行的第23个字符位置。在这个位置上,键 `type` 的缩进不正确,导致 YAML 解析器无法正确识别该键和其对应的值。
正确的缩进应该是在 `deploy` 下面增加两个空格,使其与上一行的 `type` 对齐。修改后的代码如下:
```yaml
deploy:
type: git
repository: git@github.com:Cici-Cici/laij ...
```
请注意,YAML 对缩进非常敏感,因此确保在编辑 YAML 文件时保持一致的缩进风格,一般建议使用两个空格或四个空格作为缩进。
/etc/netplan/00-installer-config.yaml:2:13: Error in network definition: expected mapping (check indentation) ethernets:
这个错误提示是因为在 `/etc/netplan/00-installer-config.yaml` 这个文件的第2行第13列的位置有语法错误。具体来说,这个文件中的配置应该是一个 YAML 格式的文本,其中 `ethernets` 应该是一个 mapping,但是这个 mapping 的格式可能有误,导致解析时出现了错误。
您可以检查这个文件的语法,特别是 `ethernets` 这个 mapping 的格式是否正确。您可以参考以下示例:
```
network:
version: 2
ethernets:
eth0:
dhcp4: true
```
这个示例中,`ethernets` 是一个 mapping,其中 `eth0` 是一个网络接口的名称,`dhcp4: true` 表示使用 DHCP 自动获取 IP 地址。
如果您还有其他问题,可以提供更多的信息,我会尽力帮助您解决问题。