zoukankan      html  css  js  c++  java
  • 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格式不对。需要仔细观察这个文件的格式,尤其是空格的部分。

  • 相关阅读:
    通过class定位打包后的resour路径
    maven-antrun-plugin
    maven-shade-plugin Premain-Class
    mac settings 在idea位置
    (第七天)[js] 统计某一字符或字符串在另一个字符串中出现的次数
    (第六天)[jS] 写一个去除制表符和换行符的方法
    (第五天)[js] 写一个把字符串大小写切换的方法
    (第四天)[js] 写一个方法把下划线命名转成大驼峰命名
    (第三天)[js] 去除字符串中最后一个指定的字符
    详解python中的*与**用法
  • 原文地址:https://www.cnblogs.com/will--1213/p/14853441.html
Copyright © 2011-2022 走看看