goharbor/harbor · error
no config file is specified
Error message
no config file is specified
What it means
Error "no config file is specified" thrown in goharbor/harbor.
Source
Thrown at src/jobservice/main.go:60
)
func main() {
// Start pprof server
lib.StartPprof()
cfgLib.DefaultCfgManager = common.RestCfgManager
if err := cfgLib.DefaultMgr().Load(context.Background()); err != nil {
panic(fmt.Sprintf("failed to load configuration, error: %v", err))
}
// Get parameters
configPath := flag.String("c", "", "Specify the yaml config file path")
flag.Parse()
// Missing config file
if configPath == nil || utils.IsEmptyStr(*configPath) {
flag.Usage()
panic("no config file is specified")
}
// Load configurations
if err := config.DefaultConfig.Load(*configPath, true); err != nil {
panic(fmt.Sprintf("load configurations error: %s\n", err))
}
// Append node ID
vCtx := context.WithValue(context.Background(), utils.NodeID, utils.GenerateNodeID())
// Create the root context
ctx, cancel := context.WithCancel(vCtx)
defer cancel()
// Initialize logger
if err := logger.Init(ctx); err != nil {
panic(err)
}
View on GitHub (pinned to 7b2fd08cc5)
When it happens
Trigger: Thrown at src/jobservice/main.go:60 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/ae6ff03ee21be2ed.
Report an issue: GitHub.