google-gemini / google-gemini/gemini-cli
User-level git config is ignored after pull request #28792
- Dominant language
- TypeScript
- Stars
- 107k
- Forks
- 14.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 45
Description
### What happened?
1. Configure `user.name` and `user.email` at user level (in `~/.gitconfig`).
2. gemini-cli is asked to commit the changes.
3. gemini-cli call `git commit -m "..."` with the bash tool.
4. Get the following error:
```
Author identity unknown
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got '***@***.(none)')
```
### What did you expect to happen?
git should use the user level config in `~/.gitconfig`, including:
* user name, email, signingKey
* `init.defaultBranch` preference
* user's preference on `pull.rebase`
### Client information
Client Information
Run `gemini` to enter the interactive CLI, then run the `/about` command.
```console
│ About Gemini CLI │
│ │
│ CLI Version 0.57.0 │
│ Git Commit 6b0ae9a6c │
│ Model Auto │
│ Sandbox no sandbox │
│ OS linux │
│ Auth Method Signed in with Google (***) │
│ Tier Gemini Code Assist Standard │
│ GCP Project ***
```
### Login information
_No response_
### Anything else we need to know?
_No response_
Contributor guide
Research direction
No source file or test is named. Reproduce the issue with user.name and user.email in ~/.gitconfig, then trace the bash tool's git commit invocation and its environment/config handling. Done means git commit uses the user-level name, email, signingKey, init.defaultBranch, and pull.rebase preferences.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100