-1

Everything else seems to work okay with the SSH keys, but when I do:

git commit -m "message"

It gives me 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 <COMPUTER_NAME>) not allowed

Like I said, everything else, git add, git push, git pull works as intended (Git push/pull asks for SSH authentication) except for commit.

I have checked the .git/config file to make sure it was setup for SSH and in fact it was.

  • 1
    Those are not *credentials*. When you make a new commit, Git needs to know what arbitrary strings to put in for name and email address. You may choose anything you like here; Git will trust you. You *should* choose something valid because otherwise other people will get annoyed with you. – torek Mar 27 '22 at 17:25
  • https://stackoverflow.com/search?q=%5Bgit%5D+Please+tell+me+who+you+are – phd Mar 27 '22 at 19:44

1 Answers1

0

This isn't a prompt for credentials. When you make a commit, Git needs to know the name (that is, a personal name, not a username) and the email address to embed in the commit. This data has absolutely nothing to do with authenticating, but is merely required for the commit to be created by Git. Once you've committed, you can see this data with git log.

You should specify your personal name and email address as directed and then the commit can succeed.

bk2204
  • 64,793
  • 6
  • 84
  • 100