-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repos fail to commit with error "author field is required" when using git config includes for [user] section #48
Comments
Thanks for the detailed bug report! Just wanted to acknowledge receipt. I'll take a look as soon as I can. |
I'm seeing the exact problem and the workaround works great. It'd be great to get this problem fixed though because people have this setup when they have multiple github accounts (work vs personal). |
Small note on the workaround for others finding this issue. You can easily add the git config --global user.name "John Doe"
git config --global user.email "[email protected]" |
This is still broken. There's legitimate use cases to separate your gitconfig and the authors therein. |
Yes, I just hit that too |
git-xargs version
git-xargs version v0.0.11
Describe the bug
Logs here. When running git-xargs, I get the error "author field is required" during the commit step. This seems to be true of any repo I try with git-xargs.
It looks related to my git config includes. I use a different email addresses for git at work and use includes to specify my user.name and user.email on different machines. My ~/.gitconfig contains:
and
I've never had any issue with this before, but notice this in the git-config man pages. It implies that git-config might not honor includes in some cases and that you might have to include an explicit option.
Just to make sure the includes are read properly by git:
To Reproduce
Steps to reproduce the behavior:
user.name
anduser.email
from your ~/.gitconfig, to ~/.gitconfig.local[includes]
section as above in ~/.gitconfig to include ~/.gitconfig.localrepos file contains the single repo
18F/ghad
.Expected behavior
git-xargs respects the git config include and attributes the author correctly AND git-xargs warns when it cannot identify the author for the commit.
Screenshots
Logs https://gist.github.com/adborden/f0000d75107e1971940d48b58bc710be
Additional context
To work-around, I confirmed that you can set the
user.name
anduser.email
in the main config and git-xargs works as expected.The text was updated successfully, but these errors were encountered: