Skip to content
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

Cannot Deploy without git config --global setting. #235

Open
54yd opened this issue Mar 31, 2018 · 3 comments
Open

Cannot Deploy without git config --global setting. #235

54yd opened this issue Mar 31, 2018 · 3 comments

Comments

@54yd
Copy link

54yd commented Mar 31, 2018

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.

  1. git config global set "user.useconfigonly=true", and no "user.name" / "user.email" keys and values.
  2. 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.

2018-03-31 23 16 28

@TeemuKoivisto
Copy link

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:

  1. Checkout to gh-pages -branch: git checkout gh-pages (add -b if the branch doesn't exist)
  2. Run: npm run deploy
  3. Add files: git add -A
  4. Create commit: git commit -m "Version 0.1.0"
  5. Maybe tag it: git tag v.0.1.0
  6. Push it to Github: git push origin gh-pages --tags

Now the project should be available at http://USERNAME.github.io/REPOSITORY

@mhenry07
Copy link

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.

@nuklearfiziks
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants