DEV Community

WildTuna
WildTuna

Posted on • Edited on

1

GitHub: Authentication failed on git push

Image description

Столкнулся тут с проблемой внесения изменений в одну из своих библиотек на GitHub, а именно ошибкой аутентификации.

Image description

Достаточно странно. Пароль точно верный, но в чем же дело? Стал вспоминать, что последнее делал в GitHub и вспомнил. Я включил двухфакторную аутентификацию.

Image description

Лечится эта проблема просто. Заходим в Settings -> Developer settings (отдельная кнопка внизу в левом меню). В открывшемся окне выбираем Personal access tokens и наживаем на кнопку Generate new token (https://github.com/settings/tokens/new). В открывшемся окне указываем название токена и нужные права доступа.

Image description

После заполнения нажимаем кнопку Generate token и копируем полученный токен в буфер обмена, он понадобится для аутентификации в git push.

Image description

Рекомендую сохранить его, так как повторный просмотр в интерфейсе невозможен.

Тепер возвращаемся к терминалу в каталог с локальным репозиторием и вводим команду git push. Git запросит Username и Password. Вводим ваш Username на GitHub и созданный access token вместо своего пароля.

Image description

Вот и все, теперь аутентификация снова работает! Удачи!

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more