Guide

Save and check your Git identity

Install gitrole, apply a saved role, and understand the identity checks.

Gitrole saves a Git name and email as a named role, applies that role to a repository or your global Git configuration, and checks the effective author and committer. It also observes the current default push destinations and supported SSH authentication.

Start here

  1. Install and update gitrole: choose npm or Homebrew and confirm the version.
  2. Use the right Git identity for this repo: save a role, apply it locally, and run the first check.
  3. Troubleshoot identity warnings: identify what a warning means and choose the next action.

The installation channels can publish different versions. The first-use guide includes the common HTTPS warning and the matching-pin exception; an applied role alone does not verify push credentials.

Choose a check

Command Use it to
gitrole check commit Check saved commit identity and policy locally, without remote or SSH checks.
gitrole current Find the saved role matching Git's effective author.
gitrole status Read a concise identity and default push check.
gitrole doctor Explain warnings and inspect each push destination.
gitrole status --short --offline Read local checks without invoking SSH. HTTPS pin checks still apply.

For status and doctor, exit 0 means aligned, 2 means warning, and 1 means the command failed. check commit is quiet on success, exits 2 for a local mismatch, and 1 for a failure. auth=na means authentication was skipped or does not apply; it does not prove credentials. No result guarantees a future commit's explicit author or a successful push.

Continue with a task

Reference

Use Commands for flags and side effects, and Machine-readable contracts for field vocabulary, JSON shapes, provenance, and exit codes.