Java教程

harbor 报错,注意harbor.yml文件格式。

本文主要是介绍harbor 报错,注意harbor.yml文件格式。,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

最近部署harbor 中一直提示报错,开始一直没有找到问题,提醒自己

报错内容:

prepare base dir is set to /root/harbor
Traceback (most recent call last):
File "main.py", line 64, in <module>
main()
File "/usr/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "main.py", line 32, in main
config_dict = parse_yaml_config(conf, with_notary=with_notary, with_clair=with_clair, with_chartmuseum=with_chartmuseum)
File "/usr/src/app/utils/configs.py", line 66, in parse_yaml_config
configs = yaml.load(f)
File "/usr/lib/python3.6/site-packages/yaml/__init__.py", line 73, in load
return loader.get_single_data()
File "/usr/lib/python3.6/site-packages/yaml/constructor.py", line 35, in get_single_data
node = self.get_single_node()
File "/usr/lib/python3.6/site-packages/yaml/composer.py", line 36, in get_single_node
document = self.compose_document()
File "/usr/lib/python3.6/site-packages/yaml/composer.py", line 55, in compose_document
node = self.compose_node(None, None)
File "/usr/lib/python3.6/site-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/usr/lib/python3.6/site-packages/yaml/composer.py", line 127, in compose_mapping_node
while not self.check_event(MappingEndEvent):
File "/usr/lib/python3.6/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/usr/lib/python3.6/site-packages/yaml/parser.py", line 439, in parse_block_mapping_key
"expected <block end>, but found %r" % token.id, token.start_mark)
yaml.parser.ParserError: while parsing a block mapping
in "/input/harbor.yml", line 5, column 1
expected <block end>, but found '<block mapping start>'
in "/input/harbor.yml", line 13, column 2

这种情况99%情况下是harbor.yml格式不对。需要仔细观察这个文件的格式,尤其是空格的部分。

这篇关于harbor 报错,注意harbor.yml文件格式。的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!