AlistGo/alist · error

author name is required

Error message

author name is required

What it means

Init fails because AuthorEmail is set while AuthorName is empty — the author identity pair is incomplete in the other direction. Checked at drivers/github/driver.go:60, the last of the four pairing checks before commit-message templates are parsed.

Source

Thrown at drivers/github/driver.go:60

}

func (d *Github) GetAddition() driver.Additional {
	return &d.Addition
}

func (d *Github) Init(ctx context.Context) error {
	d.RootFolderPath = utils.FixAndCleanPath(d.RootFolderPath)
	if d.CommitterName != "" && d.CommitterEmail == "" {
		return errors.New("committer email is required")
	}
	if d.CommitterName == "" && d.CommitterEmail != "" {
		return errors.New("committer name is required")
	}
	if d.AuthorName != "" && d.AuthorEmail == "" {
		return errors.New("author email is required")
	}
	if d.AuthorName == "" && d.AuthorEmail != "" {
		return errors.New("author name is required")
	}
	var err error
	d.mkdirMsgTmpl, err = template.New("mkdirCommitMsgTemplate").Parse(d.MkdirCommitMsg)
	if err != nil {
		return err
	}
	d.deleteMsgTmpl, err = template.New("deleteCommitMsgTemplate").Parse(d.DeleteCommitMsg)
	if err != nil {
		return err
	}
	d.putMsgTmpl, err = template.New("putCommitMsgTemplate").Parse(d.PutCommitMsg)
	if err != nil {
		return err
	}
	d.renameMsgTmpl, err = template.New("renameCommitMsgTemplate").Parse(d.RenameCommitMsg)
	if err != nil {
		return err
	}

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Set author_name to complete the pair.
  2. Or clear author_email to disable the author override.
  3. Re-save the storage configuration.

Example fix

// before
AuthorName: ""
AuthorEmail: "bob@example.com"

// after
AuthorName: "bob"
AuthorEmail: "bob@example.com"
Defensive patterns

Strategy: validation

Validate before calling

if cfg.AuthorEmail != "" && strings.TrimSpace(cfg.AuthorName) == "" {
    return errors.New("author name is required when author email is set")
}

Prevention

When it happens

Trigger: Storage configuration where author_email is filled and author_name is blank.

Common situations: Browser auto-fill or copy-paste populating only the email field of the author override.

Related errors


AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15). Data as JSON: /api/errors/4a706cfa94c9f53e. Report an issue: GitHub.