I am using github desktop to upload some code for a basic website then use github pages. However, every time i try to commit to main, an error comes up saying «Author identity unknown.»
I understand I have to put my name and email in the file but where, there’s two html files with JavaScript and css but I don’t know where i put this information.

ti7
15.8k6 gold badges39 silver badges67 bronze badges
asked Apr 8, 2021 at 11:57
You can also set them in the preferences for the Desktop app.

Jeremy Caney
7,03263 gold badges48 silver badges76 bronze badges
answered Feb 27, 2022 at 10:11
2
I just experienced this error myself. For anyone still struggling with it:
In the GUI under File>>Options>>Git, my name and E-mail address were already listed in those fields. But when I manually clicked the «Save» button (without altering the name and E-mail address that appeared in those fields automatically), it fixed this issue for me.
My guess for why this happened to me: I just started running the desktop app as an admin to fix some permission-related errors that popped up immediately after installing. It could be that—while the app was having permission troubles—it was able to save my name and E-mail in the GUI, but couldn’t apply them where they counted/were usable.
Either way, hopefully this will help someone who’s stuck.
answered May 31, 2022 at 10:13
![]()
- Open git Bash
- Set an Email address in Git
$ git config --global user.email "your Email Address"
- Set a username in Git
$ git config --global user.name "user name of your GitHub"
![]()
Obsidian
3,6168 gold badges17 silver badges30 bronze badges
answered Jul 10, 2022 at 20:22
ata.jata.j
212 bronze badges
I understand I have to put my name and email in the file
It will go in your .gitconfig file (note that this is not part of the data committed to your repository).
You shouldn’t need to edit it manually though. Github Desktop is telling you the commands you need to run. Just run them on the command line.
You can also set them in the preferences for the Desktop app.
answered Apr 8, 2021 at 11:59
QuentinQuentin
907k124 gold badges1202 silver badges1331 bronze badges
1
Setting your email address for every repository on your computer
-
Open Git Bash.
-
Set an email address in Git
$ git config --global user.email "email@example.com"
done
to check that, you can confirm that you have set the email address correctly in Git:
$ git config --global user.email
email@example.com
EricSchaefer
25.1k21 gold badges67 silver badges103 bronze badges
answered Jun 15, 2021 at 14:45
In Github Desktop while pushing a code you may face an error saying,
Author Identity Unknown
In this article, we will show some easy methods to solve the error.
Solution 1:
- To check if git is available on your pc open the command prompt and run
git --version
- Then, you need to set your git credentials globally in your machine. Just run on your command prompt or Git Bash
git config --global user.email "Your Email" git config --global user.name "Your Name"
Now try to push your code.
Solution 2:
- Click on the Profile icon in the upper-right corner then click on Settings
- Then, from the left-sidebar go to Emails
- From this setting, you can select your email preference. You can add a new email and make it a primary email
- After setting up Github email, open your Github Desktop app.
- From top menu go to the File menu, then click on Options
- Then click on Git from the left sidebar.
- Here type your preferred Name and your Github Email which you set up in the previous step. Finally, Save the update.






Now, try to perform git operations. Hope it will work fine.
Thanks for reading the article. Hope it will solve your problem. If you face any problems, don’t hesitate to comment here.

# 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
Итак, вы установили 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 репозиторий в определенную папку
Деплою бота на heroku и после ввода в консоль команды: git commit -m "First relese получаю ошибку:
C:UsersIrinaDesktoppytbot2>git commit -m "First relese"
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 'Irina@Irina.(none)')
C:UsersIrinaDesktoppytbot2>
Что делать?
