Please tell me who you are git ошибка

Пытаюсь залить проект на Github,но получаю такую ошибку ???

*** 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 'user@user-��.(none)')

Как быть? В первые работаю с гитом.

задан 20 мар 2017 в 10:40

elik's user avatar

2

Git Вам явно намекает, что Вам нужно сделать. Также он говорит о том, что он попытался уже сам определить, но не получилось.

Скорее всего Вам нужны такие команды

git config --global user.email "elik@example.com"
git config --global user.name "elik"

(эмейл конечно свой напишите).

Если же Вы на работе это делаете, то лучше написать свое полное имя и рабочую почту.

git config --global user.email "vpupkin@company.com"
git config --global user.name "Vasiliy Pupkin"

ответ дан 20 мар 2017 в 10:51

KoVadim's user avatar

KoVadimKoVadim

112k6 золотых знаков93 серебряных знака159 бронзовых знаков

4

Для решения проблемы необходимо:

  git config --global user.email "you@gmail.com"
  git config --global user.name "Vasua Pupkin"

Потом:

git remote add origin https://github.com/vasilukwolf/Random-Quote-Machine
git checkout -b 1-UserStroty-bla-bla
git add .
git commit -m "1-Task-bla-bla"
git checkout master
git merge 1-UserStroty-bla-bla
git push origin master

Если что-то в вдруг после коммита не так, и забыли:

git checkout -- *

Если закомитили и затупили:

git reset HEAD

Пример нормального workflow:
введите сюда описание изображения

ответ дан 20 мар 2017 в 11:02

Dima Vasiluk's user avatar

Dima VasilukDima Vasiluk

2,3463 золотых знака19 серебряных знаков47 бронзовых знаков

4

Если используете GitHub Desktop, зайдите File—>Options—>Git.
Проверьте, чтобы всё было правильно заполнено, и нажмите Save. Должно заработать.

ответ дан 5 окт 2018 в 21:17

axdrv's user avatar

axdrvaxdrv

8648 серебряных знаков18 бронзовых знаков

Git - Author identity unknown

# git commit -m "Initial commit"

Author identity unknown

*** 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 'root@8b4ed5e4957e.(none)')

If you are trying to commit code to your git repository and you get Author identity unknown, then simply follow the two command instructions displayed.

Step 1: set user email

In the terminal run the below command with your email id for git,

git config --global user.email "you@example.com"

Step 2: set user name

In the terminal run the below command with your email id for git,

git config --global user.name "user name"

Now try to do a commit on your local branch,

% git commit -m "initial commit"
[master (root-commit) 3ebcd44] initial commit
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 MyClass.java

Search existing issues

  • I have searched the issue tracker and confirmed that I was unable to find existing issues for the problem I am experiencing.

The problem

uthor identity unknown

*** 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 ‘hp@DESKTOP-6UALG5U.(none)’)

Release version

cersion 2.9.12

Operating system

windows 10

Steps to reproduce the behavior

No response

Log files

No response

Screenshots

uthor identity unknown

*** 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 ‘hp@DESKTOP-6UALG5U.(none)’)

Additional context

no other context

Two issues here:

Setting Your Git Identity

First, your identity should be simply your full name and email address which could be your GitHub username and email combo. But this is not a verification stage as much as a “tag” to identify you; this has nothing to do directly with your GitHub username unless they are indeed one and the same.

So perhaps your version of those commands would be:

git config --global user.email "j0h@example.com"
git config --global user.name "jOh"

And then check those values like this:

git config -l

Output should be something like this; modified version of my own output for that command so the credential.helper and core.editor settings might be different for you:

credential.helper=osxkeychain
user.name=jOh
user.email=j0h@example.com
core.editor=nano

Adding Files and Making a Commit

But then you say this:

When I try to run git commit, I get this error.

git commit -m "examples"

Well, that command is missing the -a which is an alias for --all which means the following according to the man page for git-commit:

Tell the command to automatically stage files that have been modified and deleted, but new files you have not told Git about are not affected.

So the command would be:

git commit -a -m "examples"

And if you have not already added files to the repository, you would run git add for the specific file:

git add [filename]

Or maybe just use a wildcard to get all files set:

git add *

And then run the git commit command like this:

git commit -a -m "examples"

So, you installed Git on your system, cloned a Git repo, made some changes and now want to commit your changes.

The problem is that you are probably seeing an error like when you try to add a commit:

Author identity unknown
*** Please tell me who you are.
Run
 git config —global user.email «[email protected]«
 it 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 ‘root@hostname.(none)’)

The reason and solution are both mentioned in the error message.

You don’t have git username and email set and hence it asks you to set it up first using the given commands.

Let’s see how to do that.

Set up git username and email

All git commits must have a username and email address. That’s how it is built to give a collaborative environment where each change can be identified. Thus the username and email become necessary.

Git allows username and email to set up at two levels:

  • Global level: All commits in all project repositories (opt for this is you are unsure)
  • Repo level: The username and email is valid only for the current repository

Now, how do you set it up? It’s simple.

Use the following command to set up the global username:

git config --global user.name "Your Username"

You have to replace Your Username with your own username, of course.

Similarly, use the following command to set up the global email address:

git config --global user.email [email protected]

Set up email and username in Git

Note that it doesn’t have to be an actual email address. You may use a fake name and email address, however, it is a good practice to use a real email address so that your commits can be identified (if you are contributing to public repositories).

At any point in time, you can see your Git settings with:

git config --list

💡

To set Git username and email at the repository level, remove --global while setting it up from within the repository.

Bonus tip: Change Git username and email

Want to change your git username and email? It’s quite simple.

Just do what you did earlier to set up the username and email. That’s it.

Check what you have:

git config --list

And then change it:

git config --global user.name "Your Username"
git config --global user.email [email protected]

Simple, right? Enjoy it :)

Понравилась статья? Поделить с друзьями:

Интересное по теме:

  • Please report this error see console ошибка worldedit
  • Po140 код ошибки
  • Po161 код ошибки
  • Plc executive engine ошибка
  • Po1602 ошибка ваз

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии