Cannot Deploy without git config --global setting.
I saw this bug when I deploy it with my git environment below.
fatal: no email was given and auto-detection is disabled
my environment is here.
- git config global set "user.useconfigonly=true", and no "user.name" / "user.email" keys and values.
- git config local set "user.name" / "user.email" keys and values.
- [NOTE]
-
I always do switch my github account along a target repo, so never setting name/email on global. This setting is not usual for many people, so many user will not see this bug, I think.
-
Then, I use git config global, write user/email, this error resolved.
-
I think, maybe, something your implemantation around "git push", has a little bug. Please check and fix it.
Sincerely, StrayDrop
terminal screenshot is here.
Yep, I got the same problem. Then I thought why do I even need a library for this:
- Install rimraf:
yarn add -D rimraf - Add this to scripts:
"deploy": "npm run build && rimraf static && mv build/** ."
Then use this to deploy:
- Checkout to
gh-pages-branch:git checkout gh-pages(add -b if the branch doesn't exist) - Run:
npm run deploy - Add files:
git add -A - Create commit:
git commit -m "Version 0.1.0" - Maybe tag it:
git tag v.0.1.0 - Push it to Github:
git push origin gh-pages --tags
Now the project should be available at http://USERNAME.github.io/REPOSITORY
I'm experiencing a very similar issue when my local user.email differs from my global user.email.
For some reason, the user section is missing from the config file under node_modules/gh-pages/.cache/*/.git even though it is present in my project's .git/config file.
I'm getting a similar thing. When I publish, I seem to get one commit that respects the local .gitconfig, then one that reverts to the global git config.
