AlistGo/alist · error

committer email is required

Error message

committer email is required

What it means

GitHub driver Init enforces that commit metadata comes in pairs: if CommitterName is set but CommitterEmail is empty, initialization fails. Git commits require both a name and an email for the committer identity, so the driver refuses to start with a half-configured identity.

Source

Thrown at drivers/github/driver.go:51

	copyMsgTmpl   *template.Template
	moveMsgTmpl   *template.Template
	isOnBranch    bool
	commitMutex   sync.Mutex
	pgpEntity     *openpgp.Entity
}

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

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Set committer_email in the storage addition (any valid email, e.g. the GitHub account email or a noreply address like user@users.noreply.github.com).
  2. Or clear committer_name so both fields are empty and GitHub defaults are used.
  3. Re-save the storage to re-run Init.

Example fix

// before
CommitterName: "alice"
CommitterEmail: ""

// after
CommitterName: "alice"
CommitterEmail: "alice@users.noreply.github.com"
Defensive patterns

Strategy: validation

Validate before calling

if cfg.CommitterName != "" && strings.TrimSpace(cfg.CommitterEmail) == "" {
    return errors.New("committer email is required when committer name is set")
}

Prevention

When it happens

Trigger: Storage configuration where committer_name is filled and committer_email is blank. Checked at drivers/github/driver.go:51 before templates are parsed.

Common situations: User copies settings from a tutorial that only showed the name field; YAML/env import dropping the email; assumption that the OAuth token identity is used automatically for commits.

Related errors


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