Skip to content

Fix test error "fatal: empty ident name (for <(null)>) not allowed"#154

Merged
asottile merged 1 commit intopre-commit:masterfrom
alzeih:patch-1
Dec 2, 2016
Merged

Fix test error "fatal: empty ident name (for <(null)>) not allowed"#154
asottile merged 1 commit intopre-commit:masterfrom
alzeih:patch-1

Conversation

@alzeih
Copy link
Copy Markdown
Contributor

@alzeih alzeih commented Dec 1, 2016

This occurs when there is no global setting for git config options user.name and user.email

An example of the error shown below:

E           pre_commit.util.CalledProcessError: Command: ('/usr/bin/git', 'commit', '-m', 'init', '--allow-empty')
E           Return code: 128
E           Expected return code: 0
E           Output: (none)
E           Errors:
E
E               *** Please tell me who you are.
E
E               Run
E
E                 git config --global user.email "you@example.com"
E                 git config --global user.name "Your Name"
E
E               to set your account's default identity.
E               Omit --global to set the identity only in this repository.
E
E               fatal: empty ident name (for <(null)>) not allowed

@asottile
Copy link
Copy Markdown
Member

asottile commented Dec 1, 2016

This is already handled here:

before_install:
- git config --global user.name "Travis CI"
- git config --global user.email "user@example.com"

(also you've got tabs)

@alzeih
Copy link
Copy Markdown
Contributor Author

alzeih commented Dec 1, 2016

@asottile It's not handled when running the test from tox locally though

I'll fix the tabs in a rebase :/ Edit: fixed

This occurs when there is no global setting for git config options user.name and user.email

An example of the error shown below:

E           pre_commit.util.CalledProcessError: Command: ('/usr/bin/git', 'commit', '-m', 'init', '--allow-empty')
E           Return code: 128
E           Expected return code: 0
E           Output: (none)
E           Errors:
E
E               *** Please tell me who you are.
E
E               Run
E
E                 git config --global user.email "you@example.com"
E                 git config --global user.name "Your Name"
E
E               to set your account's default identity.
E               Omit --global to set the identity only in this repository.
E
E               fatal: empty ident name (for <(null)>) not allowed
@asottile asottile merged commit af7659d into pre-commit:master Dec 2, 2016
@asottile
Copy link
Copy Markdown
Member

asottile commented Dec 2, 2016

Thanks for the PR!

@asottile
Copy link
Copy Markdown
Member

asottile commented Dec 2, 2016

I imagine pre-commit/pre-commit could benefit from the same change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants