git-upgrade fails if email is not set global for git
See original GitHub issueIs this a bug report?
yes
Have you read the Contributing Guidelines?
no
Environment
Environment: OS: Linux 4.13 Node: 9.5.0 Yarn: Not Found npm: 5.6.0 Watchman: Not Found Xcode: N/A Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed) react: ^16.2.0 => 16.2.0 react-native: ^0.53.2 => 0.53.2
Steps to Reproduce
- Do not setup your email for git globally
- But do setup your git email for the local project
- run react-native-git-upgrade
Expected Behavior
no errors
Actual Behavior
$ git commit -m "Project snapshot"
On branch master
nothing to commit, working directory clean
$ react-native-git-upgrade
git-upgrade info Check for updates
...
git-upgrade info Add all files to commit
git-upgrade info Commit current project sources
*** 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 'locus@cobalt.(none)')
git-upgrade ERR! An error occurred during upgrade:
git-upgrade ERR! Error: Command 'git commit -m "Project snapshot"' exited with code 128:
stderr: undefined
...
If I setup my email per git config --global user.email ...
there are no errors.
It seems that git
runs within react-native-git-upgrade
differently compared to in the shell.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
How do I make git block commits if user email isn't set?
email configuration. So starting March 2016 and git 2.8, do: git config --global user.useConfigOnly true. Any of your new repo ...
Read more >How set git config username and email fields in global and ...
In this global git config example we will show you how. ... hitting the fatal: unable to auto-detect email address error message when...
Read more >Missing user.name, user.email causes BLT to effectively fail ...
I get the following output: Client work; can't paste it. But if I cd deploy (the deployment directory) and git status , I...
Read more >How to Update Git on Linux, Windows and MacOS
The output above appears when you are running the latest Git version. Update Git on Mac. The easiest way to update Git on...
Read more >Can't login to Moodle after Git upgrade 3.5 to 3.6 "Error ...
You could let those scripts attempt to create the config.php file. If you don't have owernships/permissions right Moodle won't be able to make...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Reopening, since “react-native-git-upgrade” is still part of this repository.
We’re deprecating
react-native-git-upgrade
in favor ofreact-native upgrade
using https://github.com/react-native-community/rn-diff-purge/ under the hood since RN 0.59.0. Please try that 😃