{"record":{"id":"724ab1de6862499f","repo":"AlistGo/alist","slug":"author-email-is-required","errorCode":null,"errorMessage":"author email is required","messagePattern":"author email is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/github/driver.go","lineNumber":57,"sourceCode":"\nfunc (d *Github) Config() driver.Config {\n\treturn config\n}\n\nfunc (d *Github) GetAddition() driver.Additional {\n\treturn &d.Addition\n}\n\nfunc (d *Github) Init(ctx context.Context) error {\n\td.RootFolderPath = utils.FixAndCleanPath(d.RootFolderPath)\n\tif d.CommitterName != \"\" && d.CommitterEmail == \"\" {\n\t\treturn errors.New(\"committer email is required\")\n\t}\n\tif d.CommitterName == \"\" && d.CommitterEmail != \"\" {\n\t\treturn errors.New(\"committer name is required\")\n\t}\n\tif d.AuthorName != \"\" && d.AuthorEmail == \"\" {\n\t\treturn errors.New(\"author email is required\")\n\t}\n\tif d.AuthorName == \"\" && d.AuthorEmail != \"\" {\n\t\treturn errors.New(\"author name is required\")\n\t}\n\tvar err error\n\td.mkdirMsgTmpl, err = template.New(\"mkdirCommitMsgTemplate\").Parse(d.MkdirCommitMsg)\n\tif err != nil {\n\t\treturn err\n\t}\n\td.deleteMsgTmpl, err = template.New(\"deleteCommitMsgTemplate\").Parse(d.DeleteCommitMsg)\n\tif err != nil {\n\t\treturn err\n\t}\n\td.putMsgTmpl, err = template.New(\"putCommitMsgTemplate\").Parse(d.PutCommitMsg)\n\tif err != nil {\n\t\treturn err\n\t}\n\td.renameMsgTmpl, err = template.New(\"renameCommitMsgTemplate\").Parse(d.RenameCommitMsg)","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/github/driver.go#L39-L75","documentation":"Init fails because AuthorName is set while AuthorEmail is empty — the git author identity is incomplete. The GitHub driver lets you override author identity separately from committer identity, but each identity must have both fields. Checked at drivers/github/driver.go:57.","triggerScenarios":"Storage configuration where author_name is filled and author_email is blank, independent of the committer pair.","commonSituations":"User wants commits attributed to a different author but only fills the name; the author pair is left half-configured after experimentation.","solutions":["Set author_email to complete the author identity (e.g. author@users.noreply.github.com).","Or clear author_name so the author override is disabled entirely and the committer identity is reused.","Re-save the storage."],"exampleFix":"// before\nAuthorName: \"bob\"\nAuthorEmail: \"\"\n\n// after\nAuthorName: \"bob\"\nAuthorEmail: \"bob@users.noreply.github.com\"","handlingStrategy":"validation","validationCode":"if cfg.AuthorName != \"\" && strings.TrimSpace(cfg.AuthorEmail) == \"\" {\n    return errors.New(\"author email is required when author name is set\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate the author pair together with the committer pair.","Leave both author fields empty unless a distinct author is really needed.","Use the GitHub noreply email format for privacy."],"tags":["github","config","validation","author","go"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}