Git pull authentication failed linux

Git push приводит к » ошибка аутентификации»

я использую Github на некоторое время, и я был в порядке с git add , git commit и git push пока без проблем. Внезапно у меня возникает ошибка, которая говорит:

fatal: аутентификация не удалась

в терминале я клонировал репозиторий, работал над файлом, а затем использовал git add чтобы добавить файл в журнал фиксации и когда я сделал git commit , он работал нормально. Наконец, git push просит имя пользователя и пароль. Я положил их правильно и каждый раз, когда я это делаю, он говорит ту же ошибку.

кто-нибудь знает, в чем причина этой проблемы и как я могу это исправить?

содержание .git/config являются:

25 ответов:

Если вы включили двухфакторную аутентификацию в своей учетной записи Github, вы не удастся нажать через HTTPS с помощью пароля учетной записи. Вместо вам необходимо создать личный маркер доступа. Это можно сделать в настройки приложения вашей учетной записи Github. Использование этого токена в качестве вашего пароль должен позволять вам нажимать на ваш удаленный репозиторий через HTTPS. Используйте свое имя пользователя как обычный.

вам также может потребоваться обновить источник для вашего репозитория, если установлено значение https:

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

  1. Нажмите Кнопку Пуск
  2. Тип: Диспетчер Учетных Данных
  3. посмотреть Windows Credentials Manager ярлык и дважды щелкните его, чтобы открыть приложение.
  4. после того, как приложение открыто, нажмите на Windows Credentials tab.
  5. найдите учетные данные, которые вы хотите удалить / обновить, они будут начинаться с «git:» и могут начинаться с «ada:»
  6. нажмите на учетные данные запись, он откроет детальный вид записи. 7. Нажмите кнопку Изменить или удалить при необходимости и подтвердите.
  7. мыть, полоскать, повторять по мере необходимости.

во-первых, вы можете убедиться, что используете правильный url:

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

Если это все еще не работает, вы можете переключиться на ssh url:

но это означает, что вы опубликовали свой открытый ключ ssh в своем Настройки учетной записи.

это работает для меня, и он также помнит мои учетные данные:

укажите на каталог РЕПО

Run git config —global credential.helper wincred

возможно, вы недавно изменили пароль для своей учетной записи git Вы могли бы попробовать git push С -u опции

после выполнения вышеуказанной команды он попросит пароль предоставить ваш обновленный пароль

надеюсь, что это может помочь вам

Я думаю, что по какой-то причине GitHub ожидает, что URL-адрес не будет иметь поддомена www. Когда я использую (например)

Он дает следующие сообщения:

однако, если я использую

он работает отлично. Для меня это не имеет особого смысла. но я думаю не забудьте поместить www в удаленный URL для репозиториев GitHub.

также обратите внимание на URL-адреса клонов, предоставленные на веб-странице репозитория GitHub не включает в себя www.

Если вы обнаружили проблему с ошибкой аутентификации при вводе правильного пароля и имени пользователя, это проблема git. Чтобы решить эту проблему при установке git на вашем компьютере снимите флажок Включить git credential manager

в основном мои учетные данные были просрочены, и я столкнулся с вышеуказанной проблемой.

следующая команда 2 помогла мне:

он будет запрашивать у вас учетные данные в следующий раз, когда вы попытаетесь нажать.

следуйте приведенным ниже рекомендациям для получения более подробной информации о защищенном и незащищенном хранении имени пользователя и пароли:

Я столкнулся «$ git fetch неустранимо: ошибка проверки подлинности для ‘ http://. » после того, как мой пароль windows истек и был изменен. Несколько выборок, перезагрузка и даже переустановка git с помощью диспетчера учетных данных windows не помогли.

удивительно правильный ответ где-то здесь в комментариях, но не в ответы (и некоторые из них действительно странные!). Вам нужно перейти в Панель управления — > Диспетчер учетных данных / учетные данные Windows и обновить пароль для ГИТ:http://yourrepoaddress

у меня была та же проблема. Я установил url таким образом:

git remote set-url origin https://github.com/zkirkland/Random-Python-Tests.git

Я также удалил из конфигурационного файла эту запись: askpass = /bin/echo . Затем «git push» попросил меня ввести имя пользователя и пароль, и на этот раз это сработало.

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

не работает для меня. Однако:

только от вашего .изменение файла конфигурации:

для меня, я забыл, что я изменил пароль на Github.com, и мой брелок для аутентификации оболочки никогда не обновлялся до этого нового пароля. Удаление всего git из моей связки ключей, а затем повторное выполнение запроса git помогло решить проблему, снова предложив мне новый пароль.

просто чтобы перезвонить здесь, что исправило проблему для меня, я просто отменил первоначальное приглашение, ssh открылся с моей учетной записью bitbucket, я ввел пароль там, и все работало, как ожидалось.

Я столкнулся с той же проблемой на windows. Большую часть времени я обычно сталкиваюсь с проблемой из-за использования нескольких учетных записей git. Если вы находитесь в windows, откройте терминал от имени администратора и повторите попытку запуска команд. Убедитесь, что у вас есть права администратора.

Привет я получал ту же ошибку я пробовал все решения в зависимости от того, что упоминается на этой странице, но не работает. Наконец, я нашел решение, поэтому подумал о его публикации. Пожалуйста, поправьте меня, если я где-то ошибаюсь. Такие ошибки возникают, если иногда ваш системный пароль изменился в последнее время в любое время. Он будет пытаться проверить от старого пароля. Поэтому выполните следующие действия: перейти к панели управления — > нажмите на учетные записи пользователей -> в разделе Диспетчер учетных данных — > перейти к управлению учетными данными windows -> Перейдите к общим учетным данным — > разверните вкладку git server — > нажмите кнопку Удалить из хранилища

Я также столкнулся с ошибкой (вот почему я приземлился здесь), но ни одно из предложений не сработало для меня. Это был мой первый раз, когда я пытаюсь развернуть локальный Git в azure. Когда я получил эту ошибку, я сбросил свои учетные данные (щелкнув ссылку в Azure) после нескольких попыток. Проблема в том, что на данный момент он говорит мне, что мое имя пользователя уже занято, поэтому я также изменил свое имя пользователя на другое. В конце концов, я вручную удалил .папка git на моем локальном диске и повторно развернула ее без проблема.

Постановка Задачи: «git fatal authentication failed». Я использую оба.

устранение: Я просто удалил пользователя из управления доступом bitbucket, а затем добавил того же пользователя. Этот.файл gitconfig прост

Читайте также:  Как удалить теги mac os

с правильными учетными данными, если проблема превалирует

Если вы используете AndroidStudio 2.1 beta, то его ошибка, обновление до beta 2 (3 mb update file), это сработало для меня

убедитесь, что у вас есть разрешение на запись нажать.

убедитесь, что ваш ключ ssh добавлен в ваш текущий сеанс ssh.

скопировать вывод cat

/.ssh/id_rsa.pub к вашим настройкам GitHub под ключами SSH и GPG.

обновите текущую сессию ssh с помощью ssh-add

Я использую Windows Powershell с установленным Openssh.

Если вы включили двухфакторную аутентификацию в своей учетной записи Github, войдите в свою учетную запись GitHub и перейдите по ссылке: https://github.com/settings/tokens/new чтобы создать новый маркер доступа, скопируйте его и вставьте в качестве пароля для аутентификации в терминале.

в Android studio canary build 3.1+, Если вы используете Android studio git tool, чем вы можете использовать следующее:

  • нажмите на Android Studio
  • нажмите на Настройки.
  • перейти в VersionControl — > Github
  • здесь измените тип аутентификации на пароль
  • этот шаг потребует от вас ввести логин и пароль. Введите имя пользователя github логин s и пароль github в качестве пароля.
  • нажмите на кнопку Тест.

Если соединение успешно, чем вы сделали, и вы можете использовать android studio GitHub UI client.

Если вы находитесь в windows и пытаетесь нажать на сервер windows, на котором пользователи домена работают как пользователи репозитория( TFS), попробуйте войти в URL-адрес TFS (т. е. http:\tfs ) с IE. введите учетные данные учетной записи домена и позвольте странице появиться.

осторожностью используйте только INTERNET EXPLORER! другие браузеры не изменят учетные данные вашей системы.

Теперь перейдите в git bash и измените удаленного пользователя для репозитория, как показано ниже:

и Done, теперь вы можете нажать!

Если вы используете ssh и клонированы с https это не будет работать. Клон с SSH, а затем нажмите и тянет должен работать, как ожидалось!

Источник

Git push приводит к «Ошибка аутентификации»

Я использую Github на некоторое время , и я был хорошо с git add , git commit и до git push сих пор без проблем. Внезапно у меня появляется ошибка, которая говорит:

Неустранимый: Ошибка аутентификации

В терминале я клонировал репозиторий, работал с файлом, а затем использовал его git add для добавления файла в журнал фиксации, и когда я это сделал git commit , он работал нормально. Наконец, git push просит имя пользователя и пароль. Я вставляю их правильно, и каждый раз, когда я делаю это, появляется одна и та же ошибка.

Кто-нибудь знает, что является причиной этой проблемы и как я могу это исправить?

Если вы включили двухфакторную аутентификацию в своей учетной записи Github, вы не сможете использовать протокол HTTPS, используя пароль своей учетной записи. Вместо этого вам нужно сгенерировать личный токен доступа. Это можно сделать в настройках приложения вашей учетной записи Github. Использование этого токена в качестве пароля должно позволить вам отправлять сообщения в удаленный репозиторий по протоколу HTTPS. Используйте свое имя пользователя как обычно.

Вам также может потребоваться обновить источник для вашего репозитория, если установлено значение https:

Попробуйте выполнить следующие действия, чтобы изменить или удалить сохраненные учетные данные:

  1. Нажмите Пуск
  2. Тип: Диспетчер учетных данных (В Windows 10 это находится в «Пуск-> Настройки». Затем найдите «Диспетчер учетных данных»)
  3. Посмотрите Windows Credentials Manager ярлык и дважды щелкните его, чтобы открыть приложение.
  4. Как только приложение откроется, нажмите на Windows Credentials вкладку.
  5. Найдите учетные данные, которые вы хотите удалить / обновить, они будут начинаться с «git:» и могут начинаться с «ada:»
  6. Нажмите на учетную запись, она откроет подробный вид записи.
  7. Нажмите Редактировать или Удалить при необходимости и подтвердите.
  8. Вымойте, промойте, повторите при необходимости.

Источник

Настройка авторизации в Git

Знаю, что это нафиг никому не нужно, поэтому сохраняю нижеприведённую информацию, можно сказать, чисто для себя.

Вызвано это тем, что я уже несколько раз сталкивался с одной неприятной ситуацией. После смены пароля на корпоративный аккаунт, под которым осуществляется доступ в том числе к Git-репозиторию, и который необходимо менять каждые 3 месяца в соответствии с политикой безопасности, невозможно каким бы то ни было образом взаимодействовать с репозиторием (push, pull, check out и т.п.). Клиент говорит «invalid credentials».

Сегодня столкнулся с подобной ситуацией: не мог склонировать проект, т.к. клиент так же ругался на «invalid credentials».

Поэтому на будущее решил написать коротенькую иструкцию по быстрой настройке авторизации в Git.

Первое, что можно попробовать, это настроить имя пользователя и пароль в глобальном конфигурационном файле .gitconfig , который лежит скорее всего в домашней папке пользователя (у меня на винде это C:/Users/ ). Для этого выполняем следующие две команды:

Посмотрим, как изменилось содержимое файла .gitconfig :

Второй способ я использовал при клонировании. Тут всё ещё проще. Добавим имя пользователя и пароль прямо к URL в команде git clone:

Таким образом информация сохранится в настройках локального репозитория, в файле .git/config :

Также можно настроить имя пользователя с паролем в файле .git/config локального репозитория и командой git config (см. выше). Нужно просто выполнять её, находять в локальном репозитории и без указания параметра —global .

Читайте также:  Обновление windows 10 с помощью media creation tool

Минус всей этой ерунды в том, что логин и пароль будут легко и непринуждённо лежать прямо в обычном текстовом файле, но в защищённой корпоративной сети я не особо об этом беспокоюсь.

Источник

Git failed with a fatal error. Authentication failed #660

Comments

DigitalAssasin commented Jun 15, 2018

I browsed the issues of the credential manager repository but none of the tipps and solutions helped us so far.

We have an on-premise installation of TFS 2018 running. On all but one workspaces we can work fine with the TFS-Git repository. On one workplace there is an issue with authentication.

While cloning the repository from Visual Studio, Team Explorer shows this error:

On the command line, cloning is working great.

I tried already to log during a clone process and I can see only one significant difference.

On my (working) computer credential manager creates and stores the correct authentication information.

On the other (not working computer) credential manager tries to erase them.

We already tried things like manual creation and clean sweeping of the credentials. We tried to uninstall and re-install both Git and Visual Studio. We also tried to set the authentication method by environment variable.

Currently we use the Git for Windows which is shipped by the Visual Studio Installer.

Any ideas what we can do to get deeper in the research what causes this error on our side?

The text was updated successfully, but these errors were encountered:

whoisj commented Jun 15, 2018 •

Which version of Visual Studio are you using?

I’m wondering if you’re experiencing the same problem as described here (note I’m pointing to the comment, not the issue itself).

DigitalAssasin commented Jun 15, 2018

We are using Visual Studio Enterprise 2017 15.7.3 on all developer workstations.

whoisj commented Jun 15, 2018

Yup, we’ve found a bug in the Git for Windows package that we shipped in Visual Studio (VS does not use your installed Git, but instead contains its own Git package) that affects users using Secure Channel.

If you look at Visual Studio > Team Explorer > Settings > Global Settings , what does the Cryptographic network provider down-down menu show?

DigitalAssasin commented Jun 15, 2018

On both working and not working workstation the option is set to «Löschen / Delete(?)». We are working with the German version of Visual Studio.

whoisj commented Jun 15, 2018

«Delete»?! Maybe «Unset»? Hmm — wonder if we have a translation failure here.

If unset, it should be defaulting to OpenSSL. Why not try OpenSSL and/or Secure Channel and see if one unblocks you?

rockit666 commented Jun 18, 2018

Hi, I have the same issue here. VS 15.7.3 german version, Windows 10. I’m connected via VPN and also use a private server with http connection. I tried to repair VS, reinstall GIT, OpenSSL and secure Channel. Different configurations. Nothing works. (it works with browser) Every time the same message:

DigitalAssasin commented Jun 18, 2018

A better german translation for «Unset» could be «Nicht festgelegt» or something like that.

But anyhow: We alread tried to switch the Cryptographic network provider settings as we found this as a common tip on stackoverflow. But this doesn’t work either.

Any other ideas?

And one important thing: Thank you so much for your commitment and that you try to help us in this case!

rockit666 commented Jun 18, 2018

hmm.. I tried the same with Visual Studio Code and get the same message:
Is it a windows 10 / Git problem ?
Suchen nach Git in: C:\Program Files\Git\cmd\git.exe
Verwenden von Git 2.17.1.windows.2 von C:\Program Files\Git\cmd\git.exe

git rev-parse —show-toplevel
git config —get commit.template
Open repository: c:\Data\Projects\TFS\D4G\D4G.WebApplication
git status -z -u
git symbolic-ref —short HEAD
git show :src/app/core/services/app.service.ts
git check-ignore -z —stdin
git rev-parse develop
git rev-parse —symbolic-full-name develop@
git rev-list —left-right develop. refs/remotes/origin/develop
git for-each-ref —format %(refname) %(objectname) —sort -committerdate
git remote —verbose
git check-ignore -z —stdin
git check-ignore -z —stdin
git pull —tags origin develop
git show :src/app/core/services/app.service.ts
fatal: Authentication failed for ‘http://lomoofsv09:8080/tfs/DefaultCollection/D4G/_git/D4G.WebApplication/’

rockit666 commented Jun 18, 2018 •

that’s strange.. I tried different things..
I’m using now the IP address of the server and it works.

@DigitalAssasin : It’s maybe also a solution for you ?

DigitalAssasin commented Jun 18, 2018 •

Ok. I think, this is a thing we haven’t tried. We will try this and report.

Update

We tried this solution but it also doesn’t work on our site.

DigitalAssasin commented Jun 19, 2018

this issue persists also with the latest Visual Studio 2017 Enterprise Release 15.7.4.

But an other interesting thing: It seems that the error is caused by anything around the user account. If we use other account information on the same workstation, the cloning works great.

Maybe this is more a TFS user account management related issue.

We will research further and report our future findings.

DigitalAssasin commented Jun 19, 2018 •

OK, we figured it out.

The cloning problems were cause by a special character in the domain account password of my colleague. His password contained a ‘#’ character which prevented him from cloning the repository. We changed his password and now everything is working fine.

Do you think this behavior is relevant for the Windows Credential Manager? Or is it more a Git issue?

whoisj commented Jun 19, 2018

The cloning problems were cause by a special character in the domain account password of my colleague. His password contained a ‘#’ character which prevented him from cloning the repository. We changed his password and now everything is working fine.

Um. whoa! THAT SHOULD NOT HAPPEN.

Do you think this behavior is relevant for the Windows Credential Manager? Or is it more a Git issue?

I’m guessing that this is a bug in libcurl (Git component). I think the real solution here is to ask your TFS admin to enable NTLM authentication to the server. This will avoid entering your username + password when accessing the server, and instead rely on NTLM to handle everything for you.

rockit666 commented Jun 25, 2018

Hi all,
well.. It’s was necessary to change my password. Now I have the same problem again.
The authentication hell is back.

whoisj commented Jun 25, 2018

@rockit666 can you collect trace logs of the problem?

  1. Open Command Prompt.
  2. Run setx GIT_TRACE %UserProfile%\git.log .
  3. Run setx GCM_TRACE %UserProfile%\git.log .
  4. Restart Visual Studio.
  5. Reproduce your issue.

Once you have the logs, please share them here. Of course, please redact the logs for any private, secret, or personally identifiable information before sharing.

Git trace logs get large quickly, to stop the trace log collection

  1. Open Command Prompt.
  2. Run setx GIT_TRACE «»
  3. Run setx GCM_TRACE «»
  4. Restart Visual Studio.

hjzech commented Jul 25, 2018

I solved the authentication issue by removing the GIT credentials from windows account manager (control panel). After this Windows asks for credentials during the next GIT session and stores them again in cedential manager.

JohnyWS commented Aug 7, 2018

Not to tell too much about your password, but I’m pretty sure # isn’t the issue but ¤ is on the other hand. I had to change password for the exact same reason. :-/

pat1st commented Sep 4, 2018

thanks @hjzech this solved my issue!!
I was even able to edit my recently changed password directly inside of «Control Panel\Credential Manager»

rmjoia commented Sep 18, 2018

Same here! Thanks @hjzech!

Did it in Control Panel\Credential Manager => Windows Credentials

glrcoder commented Sep 28, 2018

My problem, too. Thanks!

htmlandreza commented Oct 8, 2018

It happened to me too, because I configured another git / github account and windows saved on the credentials, when I noticed the error I changed only in gitconfig but windows continued with the other stored account and this caused several conflicts in my VS2017.

After removing all credentials from git, VS ran normally.

georgemakapane commented Oct 11, 2018

Removing my Git Credentials from Credential Manager solved my issue.

RobertoBorges commented Oct 12, 2018

The same thing to me, removing my Git Credentials but in French : Gestionnaire d’identification

fabercs commented Oct 17, 2018

I solved the authentication issue by removing the GIT credentials from windows account manager (control panel). After this Windows asks for credentials during the next GIT session and stores them again in cedential manager.

Please somebody tell me what the cli equivalent of this resetting credentials, because in a company domain I have no permission to reach that panel.

bmcdonnell-ionx commented Jan 23, 2019

I got the error message described in the OP today on git fetch from an http (not https) repo on our Windows domain. It took a while troubleshooting until my IT guy found this issue. Deleting my credentials for that repo from Windows Credential Manager as described by @hjzech resolved my problem for now.

Is there a way to add some feature to GCMW or Git for Windows to fix or workaround this automatically? Say to have it prompt for new credentials when the stored ones fail. That way future users (including myself when I forget) don’t have to spend hours troubleshooting.

Chazoo12 commented Mar 1, 2019

Fixed this issue with Windows Credential Manager (Control Panel). I found the entry for the GitLab I was trying to hit and deleted it. Next time I made a pull request it popped a login box.

Nuck101 commented Mar 14, 2019

Just wanted to add a +1 and thanks for this, as this (Windows Credential Manager in Control Panel) also fixed my issue with closing GIT repos in TFS.

aridoaridokadotoji commented May 17, 2019

My problem too. Thanks @hjzech.

Kira-Lappo commented Aug 27, 2019

I hate the issue, really. This was one the points that made me move to linux.

It’s madness. It works only at first time use! If you change your domain password — you’re on tiny ice.

In my case I should GUESS on my own that I MUST NOT delete the record from Windows Credential Manager and just update it! Otherwise I would get into endless Authentication failed problem. Reinstallation doesn’t help here.

I spent like hours of searching, trying, googling. I just lost my patient and make it use local file storage. It’s not secure at all, but at least my butt will not burn after each password change!

raghuk421 commented Sep 12, 2019

use git bash it solves all problems

tnquan commented Oct 25, 2019

I’ve met same issue. My solution is run Microsoft Visual Studio (Pro. version) as Administrator, then login your Git account in github.com website. Then clone again. Hope this help you. Thanks !

amokhtari92 commented Nov 2, 2019 •

The problem has occurred to me too. As @Kira-Lappo mentioned, there is no way back when you remove your git credential from windows credentials manager. I did it and I couldn’t reach the remote git server through visual studio, instead, direct access using cli worked for me.

Other Reports

  • All of the repositories were available from tfs web.
  • All Important permissions re-assigned.
  • ‘helper’ config updated both in global and system config files using ‘manager’, ‘git credential manager path’ and empty values (Non of them worked).

Finally
As @DigitalAssasin experienced, I changed my account’s password (which didn’t contain any special character) and it made Visual Studio to ask my password again which turned on the git operations again.

The interesting section
When I returned to credentials manager of windows, the git url path was just contain git:http://+hostname:+port of TFS server while It has been a full absolute path of repository before.

My Comment
It seems that Visual Studio is caching credentials in its own way and does not fully rely on windows credential manager or git configuration.

Bugzuki commented Jul 8, 2020

I had an issue because I had a space character in my Windows password. Once I changed my password I had to remove the Windows Credential and then it allowed me to log in again.

This is very disappointing because I like typing sentences into my passwords, now I am back to old dumb ones.

Leon-Africa commented Oct 20, 2020

Anyone else finding themselves here — take note if you may be on a corporate proxy.

Steps to resolve (On windows):

  1. Go to Windows Credentials Helper and delete all git credentials
  2. Go to .gitconfig (found in

Ensure correct Username and Email is specified in [user]

  1. Now attempt to clone the repository — you will be prompted to enter credentials — these credentials will then be stored in Windows Credential Helper for future use.

Источник

Оцените статью