question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

git-upgrade fails if email is not set global for git

See original GitHub issue

Is 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

  1. Do not setup your email for git globally
  2. But do setup your git email for the local project
  3. 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
grabboucommented, Jan 16, 2019

Reopening, since “react-native-git-upgrade” is still part of this repository.

0reactions
thymikeecommented, Mar 20, 2019

We’re deprecating react-native-git-upgrade in favor of react-native upgrade using https://github.com/react-native-community/rn-diff-purge/ under the hood since RN 0.59.0. Please try that 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found