AlistGo/alist · error

author email is required

Error message

author email is required

What it means

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.

Source

Thrown at drivers/github/driver.go:57

func (d *Github) Config() driver.Config {
	return config
}

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)

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Set author_email to complete the author identity (e.g. author@users.noreply.github.com).
  2. Or clear author_name so the author override is disabled entirely and the committer identity is reused.
  3. Re-save the storage.

Example fix

// before
AuthorName: "bob"
AuthorEmail: ""

// after
AuthorName: "bob"
AuthorEmail: "bob@users.noreply.github.com"
Defensive patterns

Strategy: validation

Validate before calling

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

Prevention

When it happens

Trigger: Storage configuration where author_name is filled and author_email is blank, independent of the committer pair.

Common situations: User wants commits attributed to a different author but only fills the name; the author pair is left half-configured after experimentation.

Related errors


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