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

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

Closed
voxspox opened this issue Feb 19, 2018 · 8 comments
Closed

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

voxspox opened this issue Feb 19, 2018 · 8 comments
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@voxspox
Copy link

voxspox commented Feb 19, 2018

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 "[email protected]"
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.

@stale
Copy link

stale bot commented Jun 11, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added Stale There has been a lack of activity on this issue and it may be closed soon. and removed Stale There has been a lack of activity on this issue and it may be closed soon. labels Jun 11, 2018
@stale
Copy link

stale bot commented Sep 13, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 13, 2018
@voxspox
Copy link
Author

voxspox commented Sep 18, 2018

This is still an issue

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 18, 2018
@stale
Copy link

stale bot commented Dec 18, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@voxspox
Copy link
Author

voxspox commented Jan 4, 2019

ok. I found out what is the problem:

react-native-git-upgrade creates a temporary git repository. Therefore the default email is used. If it is not set the described malicious behavior occurs.

@hramos
Copy link
Contributor

hramos commented Jan 14, 2019

The command line tools have their own repository and issue tracker over at https:/react-native-community/react-native-cli.

@grabbou
Copy link
Contributor

grabbou commented Jan 16, 2019

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

@thymikee
Copy link
Contributor

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

@facebook facebook locked as resolved and limited conversation to collaborators Mar 20, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants