edquant / edh7916

Course materials and website for EDH7916: Contemporary Research in Higher Education
https://edquant.github.io/edh7916/
3 stars 1 forks source link

"user.name" and "user.email" error with RStudio and Git #1

Closed btskinner closed 4 years ago

btskinner commented 4 years ago

When using git on a Windows machine for the first time, an error keeps occurring that asks for the "user.email" and "user.name". (The problem is described in this RStudio issue.)

The user sees a window with something like this:

*** 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: empty ident name (for rstudio-user@a54136f278c2.(none)) not allowed

btskinner commented 4 years ago

This appears to be the solution

  1. In the RStudio Terminal (not the Console but the tab next to it --- the prompt should have a $ and not >), type
    $ git config --list --show-origin

    If you see nothing related to your GitHub user ID or email or the information is incorrect, continue to the next step.

  2. One at a time, type
    $ git config --global user.name "<username>"
    $ git config --global user.email "<email@address.edu>"

    replacing <username> with your GitHub ID or name and <email@address.edu> with your email, leaving the quotes in both cases

  3. Type
    $ git config --list --show-origin

    again to confirm that information is now stored (it should print to the Terminal output).

  4. Use Git to confirm it has worked.