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

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

Первое, что вам следует сделать после установки Git — указать ваше имя и адрес электронной почты. Это важно, потому что каждый коммит в Git содержит эту информацию, и она включена в коммиты, передаваемые вами, и не может быть далее изменена:

Для этого в консоли выполите следующие комманды:

git config --global user.name "Vasya Pupkin"
git config --global user.email "[email protected]"

Первоначальная настройка Git

Commit failed - exit code 128 received, with output: '*** 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 '[email protected].(none)')'

В ошибке прямо это и написано если причитаться =)

If you are a developer, it is very likely that you have encountered the «Please tell me who you are» error message while using Git. This error is usually caused by an incorrect or missing Git identity configuration. Git identity is essential because it helps you to identify the author of the commits you make. In this guide, we will show you how to set your Git identity to avoid the «Please tell me who you are» error.

Prerequisites

Before we get started, you need to have Git installed on your system. If you do not have Git installed, you can download it from the official Git website (https://git-scm.com/downloads).

Setting Your Git Identity

To set your Git identity, you need to configure your name and email address. Here are the steps to do this:

Open your terminal or command prompt.

Type the following command to set your name:

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

Replace «Your Name» with your actual name.

Type the following command to set your email address:

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

Replace «youremail@example.com» with your actual email address.

Verify that your Git identity has been set correctly by typing the following command:

git config --list

This command will display your Git configuration, including your name and email address.

FAQ

Q1. Why do I need to set my Git identity?

A1. Setting your Git identity helps you to identify yourself as the author of the commits you make. It also helps other developers to understand who made the changes.

Q2. What happens if I do not set my Git identity?

A2. If you do not set your Git identity, Git will prompt you to set it when you make your first commit. If you ignore this prompt, you will encounter the «Please tell me who you are» error.

Q3. Can I set my Git identity on a per-project basis?

A3. Yes, you can set your Git identity on a per-project basis by omitting the —global option in the Git config command.

Q4. Can I set multiple Git identities on the same system?

A4. Yes, you can set multiple Git identities on the same system by specifying a different name and email address for each identity. You can do this by omitting the —global option in the Git config command.

Q5. How do I change my Git identity?

A5. To change your Git identity, simply run the Git config command again with the new name and email address.

Conclusion

Setting your Git identity is a crucial step in using Git, and it helps you to avoid the «Please tell me who you are» error. By following the steps outlined in this guide, you can easily set your Git identity and start making commits. If you encounter any issues or have any questions, please refer to the FAQ section or consult the Git documentation.

Итак, вы установили Git в своей системе, клонировали Git-репо, внесли некоторые изменения и теперь хотите закоммитить их.

Проблема в том, что при попытке добавить коммит вы, вероятно, видите ошибку:

Author identity unknown
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
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)')

Причина и решение указаны в сообщении об ошибке.

У вас не установлены имя пользователя git и электронная почта, поэтому он просит вас сначала установить их с помощью приведенных команд.

Давайте посмотрим, как это сделать.

Настройка имени пользователя и электронной почты git

Все git-коммиты должны иметь имя пользователя и адрес электронной почты.

Так он устроен, чтобы создать среду для совместной работы, где каждое изменение может быть идентифицировано.

Таким образом, имя пользователя и электронная почта становятся необходимыми.

Git позволяет настраивать имя пользователя и адрес электронной почты на двух уровнях:

  • Глобальный уровень: Все коммиты во всех репозиториях проекта (выберите этот вариант, если вы не уверены)
  • Уровень репозитория: Имя пользователя и email действительны только для текущего репозитория

Используйте следующую команду для настройки глобального имени пользователя:

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

Разумеется, вы должны заменить Your Username на ваше собственное имя пользователя.

Аналогично, используйте следующую команду для настройки глобального адреса электронной почты:

git config --global user.email user@email.com

Обратите внимание, что это не обязательно должен быть реальный адрес электронной почты.

Вы можете использовать вымышленное имя и адрес электронной почты, однако, хорошей практикой является использование реального адреса электронной почты, чтобы ваши коммиты могли быть идентифицированы (если вы вносите вклад в публичные репозитории).

В любой момент времени вы можете посмотреть свои настройки Git с помощью:

git config --list

Чтобы задать имя пользователя и email Git на уровне репозитория, удалите –global при настройке.

Бонусный совет: Изменение имени пользователя и электронной почты Git

Хотите изменить свое имя пользователя и электронную почту в git? Это довольно просто.

Просто сделайте то же самое, что вы делали ранее для настройки имени пользователя и электронной почты.

Вот и все.

Проверьте, что у вас получилось:

git config --list

А затем измените его:

git config --global user.name "Your Username"
git config --global user.email user@email.com

см. также:

  • 📜 Как перечислить теги Git
  • 📜 В чем разница между Git Switch и git Checkout?
  • 📜 Как удалить теги Git
  • 📜 Как создавать теги Git
  • 📜 Как клонировать Git репозиторий в определенную папку

Понравилась статья? Поделить с друзьями:
  • Please plug the cable ошибка
  • Please install gigabyte app center utility first ошибка
  • Please install chrome stable 72 or later ошибка
  • Please insert the app card ошибка
  • Please confirm sending error report world of tanks ошибка