«Убедитесь, что вы настроили свои ‘user.email’ и ‘user.name’ в git» при попытке перейти в git lab
Я продолжаю получать одно и то же сообщение, когда пытаюсь нажать на свою учетную запись git lab:
«Убедитесь, что вы настроили свои ‘user.email’ и ‘user.name’ в git».
У кого-нибудь есть идеи, что еще я могу сделать?
1 ответ
Значения Git user.name и user.email запрашивают ваше фактическое имя и адрес email. Ради обсуждения предположим, что я хотел бы сохранить свой адрес email в тайне, но однажды захочу открыть исходный код репозитория и импортировать его в Github. Сотни коммитов / толчков позже, мое настоящее имя и.
Я настраиваю свои глобальные свойства
Убедитесь, что вы ввели эти команды в сеансе CMD, запущенном не как «Administrator», а как ваша обычная учетная запись пользователя Windows.
Вы можете проверить, установлен ли этот параметр, зайдя в свой репозиторий и набрав:
Похожие вопросы:
Значения Git user.name и user.email запрашивают ваше фактическое имя и адрес email. Ради обсуждения предположим, что я хотел бы сохранить свой адрес email в тайне, но однажды захочу открыть исходный.
Я настраиваю свои глобальные свойства
Недавно я начал работать над проектом, который использует GitHub для управления версиями. Я привык к SVN и доволен им, я новичок в Git, и некоторые вещи в нем очень раздражают. Один из них.
У меня есть хранилище на моей локальной машине. Этот репозиторий имеет 2 git пульта дистанционного управления. Пульты дистанционного управления A и B. Пульт дистанционного управления A требует.
Как настроить имя пользователя и адрес электронной почты Git
Главное меню » Linux » Как настроить имя пользователя и адрес электронной почты Git
Git позволяет вам установить глобальное имя пользователя и адрес электронной почты для каждого проекта. Вы можете установить или изменить свою личность с помощью git configкоманды. Изменения влияют только на будущие коммиты. На имя и адрес электронной почты, связанные с совершенными вами изменениями, это не влияет.
Настройка имени пользователя и пароля Global Git
Глобальное имя пользователя и пароль git связаны с коммитами во всех репозиториях в вашей системе, которые не имеют значений, специфичных для репозитория.
Чтобы установить глобальное имя коммита и адрес электронной почты, выполните git configкоманду с параметром –global:
После этого вы можете подтвердить, что информация установлена, запустив:
Команда сохраняет значения в файле глобальной конфигурации
Вы также можете отредактировать файл в текстовом редакторе, но рекомендуется использовать git команду config.
Настройка имени пользователя и пароля Git для одного репозитория
Если вы хотите использовать другое имя пользователя или адрес электронной почты для конкретного репозитория, запустите git configкоманду без опции –global из каталога репозитория.
Допустим, вы хотите установить специфичное для репозитория имя пользователя и адрес электронной почты для хранимых в каталоге
/Code/myapp. Сначала переключитесь на корневой каталог репозитория:
Установите имя пользователя и адрес электронной почты Git:
Убедитесь, что изменения были сделаны правильно:
Вывод
Имя пользователя и адрес электронной почты Git могут быть установлены с помощью команды git config. Значения связаны с вашими коммитами.
Оставьте комментарий ниже, если вы столкнулись с проблемой или хотите оставить отзыв.
Если вы нашли ошибку, пожалуйста, выделите фрагмент текста и нажмите Ctrl+Enter.
Git fails to auto-detect user.name and user.email after update to 1.52.0 #112294
Comments
michvllni commented Dec 11, 2020
Steps to Reproduce:
Note: This does not happen when committing directly through a shell (for example powershell or mingw64), so it has to be a problem with VS Code.
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered:
We are unable to convert the task to an issue at this time. Please try again.
The issue was successfully created but we are unable to update the comment at this time.
vscodebot bot commented Dec 11, 2020
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
gchovanyecz commented Dec 11, 2020
jplackey commented Dec 11, 2020
eamodio commented Dec 11, 2020
michvllni commented Dec 13, 2020 •
As an alternative: Maybe give us the possibility to enable the auto-detection in the settings?
EDIT: Alternatively, maybe make it a warning instead of an error? At least that is what git does as well
mark-hahn commented Dec 13, 2020 •
EDIT: This is in wsl in windows.
mrwensveen commented Dec 14, 2020
A lot of users probably don’t use the git command line (a lot) and just use the interface VSCode and the Git extension give them. The Learn More button links to a git-scm page that may be confusing to them. It would be nice to be able to configure this from within vscode / the git extension.
Irimax commented Dec 15, 2020
Hello I have the same problem in addition I have several git accounts with a credentials because I use git for me and for the work thank you for fixing the problem even if I use the terminal it is still more practical with vscode
abby-d commented Dec 15, 2020 •
We’re having this issue at my work, too. We’ve all updated, but only one person is getting this error. We use Git and GitHub and VSC to version our help content, so we’re all technical writers, not developers—and we aren’t able to resolve this issue for a person on our team. More communication on this change and a more visual interface for updating this information would be really useful.
Edit: just kidding, we’re all experiencing the issue now.
CoreTechnologyAG commented Dec 16, 2020 •
this worked for me.
git config user.name «name»
git config user.email name@changeme.com
But it has to be entered in each project.
VS-Version:
Version: 1.52.0 (user setup) Commit: 940b5f4bb5fa47866a54529ed759d95d09ee80be Date: 2020-12-10T22:45:11.850Z Electron: 9.3.5 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Windows_NT x64 10.0.19042
GuilhermeAbacherli commented Dec 17, 2020
michvllni commented Dec 17, 2020
@CoreTechnologyAG @GuilhermeAbacherli
I know how to resolve it, the reason why I opened this issue is because i think it can be done better.
@eamodio could you take a Look at our suggestions?
They are as following:
Suggestion 1: Make an option in the settings to enable/disable auto-detect
Suggestion 2: Make it a Warning instead of an error (Like git does as well)
Suggestion 3: Give us the option to set user.name and user.email directly from VS Code (By @mrwensveen and @abby-d )
jobe451 commented Dec 23, 2020
I work on quite a few little personal never shared with others projects and I simply use a local git repository, not synced to anything remote.
So far setting up such a project was essentially a single click. Now I should every few weeks lookup somewhere the syntax to set name and mail by command line. If there were at least a quick dialog when creating the repo asking for name and mail that would be very helpful.
LorenzoColombi commented Jan 8, 2021
eamodio commented Jan 8, 2021
@michvllni I opened: #114049 to track that
vicchimenti commented Jan 11, 2021 •
I get this same error when setting up vscode on a new computer. When I check my git config everything looks good:
My github profile is also save in vs code yet I get this error:
*** Please tell me who you are.
fatal: no email was given and auto-detection is disabled
I was able to clone the the repo using git clone in the wsl terminal, but commiting via Source Control give me this Author identity unknow error
Virtual Geek
Tales from real IT system administrators world and non-production environment
Solved Visual studio Code make sure you configure your user.name and user.email in git
Recently I formatted laptop and all the settings for my script environment where gone, I developed lots of PowerShell script using my laptop and use Version control to track changes which is very important, especially when I daily change my codes. Although I solely write my code, still if i require it to be collaborated in future I can maintain some system for versioning, a version control system can allow me to development with my DevOps teams to build and ship better products faster.
I find Visual studio code is best so far for developing my powershell codes, I use Git as version control system. and using git on Visual studio is very easy, it provides GUI way. Git is already installed on my system ( https://git-scm.com/download/win ). here for example I have built my few small scripts, they are working fine. Now I want a version control so I can move with further development. To proceed with GIT click on Source Control button on the left had side.
This shows me No source control providers registered. I will add one local git as a provider, By clicking very small git icon as shown, shows me where I want to create git related files (version control system). I will select the default folder for this (all my scripts are in same files.)
Once added workspace, As no files are staged on the git system and all files and folders are untracked with U message. Press + on change and type something useful message (ie: First Initial).
The next, I faced error when clicking on commit button. The error was «Make sure you configure your «user.name» and «user.email» in git.» or «Git: *** Please tell me who you are«, Clicking on open git log, shows Output whats going wrong.
Output shows Git need to configured with global settings and few commands need to be run, To correct this open CMD prompt, by default git is installed under C:\Program Files\Git\bin. cd to the location and run below command.
cd C:\Program Files\Git\bin
You can follow same step by watching below video.
Первоначальная настройка Git
Теперь, когда Git установлен в вашей системе, самое время настроить среду для работы с Git под себя. Это нужно сделать только один раз — при обновлении версии Git настройки сохранятся. Но, при необходимости, вы можете поменять их в любой момент, выполнив те же команды снова.
Чтобы посмотреть все установленные настройки и узнать где именно они заданы, используйте команду:
Имя пользователя
Первое, что вам следует сделать после установки Git — указать ваше имя и адрес электронной почты. Это важно, потому что каждый коммит в Git содержит эту информацию, и она включена в коммиты, передаваемые вами, и не может быть далее изменена:
Многие GUI-инструменты предлагают сделать это при первом запуске.
Выбор редактора
Теперь, когда вы указали своё имя, самое время выбрать текстовый редактор, который будет использоваться, если будет нужно набрать сообщение в Git. По умолчанию Git использует стандартный редактор вашей системы, которым обычно является Vim. Если вы хотите использовать другой текстовый редактор, например, Emacs, можно проделать следующее:
В системе Windows следует указывать полный путь к исполняемому файлу при установке другого текстового редактора по умолчанию. Пути могут отличаться в зависимости от того, как работает инсталлятор.
В случае с Notepad++, популярным редактором, скорее всего вы захотите установить 32-битную версию, так как 64-битная версия ещё не поддерживает все плагины. Если у вас 32-битная Windows или 64-битный редактор с 64-битной системой, то выполните следующее:
Vim, Emacs и Notepad++ — популярные текстовые редакторы, которые часто используются разработчиками как в Unix-подобных системах, таких как Linux и Mac, так и в Windows. Если вы используете другой редактор или его 32-битную версию, то обратитесь к разделу Команды git config core.editor за дополнительными инструкциями как использовать его совместно с Git.
В случае, если вы не установили свой редактор и не знакомы с Vim или Emacs, вы можете попасть в затруднительное положение, когда какой-либо из них будет запущен. Например, в Windows может произойти преждевременное прерывание команды Git при попытке вызова редактора.
Настройка ветки по умолчанию
Например, чтобы установить имя main для вашей ветки по умолчанию, выполните следующую команду:
Проверка настроек
Некоторые ключи (названия) настроек могут отображаться несколько раз, потому что Git читает настройки из разных файлов (например, из /etc/gitconfig и
/.gitconfig ). В таком случае Git использует последнее значение для каждого ключа.
Также вы можете проверить значение конкретного ключа, выполнив git config :
Так как Git читает значение настроек из нескольких файлов, возможна ситуация когда Git использует не то значение что вы ожидали. В таком случае вы можете спросить Git об origin этого значения. Git выведет имя файла, из которого значение для настройки было взято последним:






