Переход с HTTPS на SSH github

Содержание
Проблема
Решение
Другие статьи про Git

Проблема

Авторизация по паролю запрещена с 13 августа 2021-го года

Username for 'https://github.comUsername for ': andreiolegovichru Password for Username for 'https://andreiolegovichru@github.comUsername for ': remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information. fatal: Authentication failed for Username for 'https://github.com/andreiolegovichru/spider-den/Username for '

Нужно переходить на другой способ авторизации - например по SSH

Решение

cd ~/.ssh
ssh-keygen -t ed25519 -C "username@email.ru"
eval `ssh-agent -s`
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub

В браузере открыть

https://github.com/settings/keys

New SSH key

Вставить туда ключ и сохранить

git remote set-url origin git@github.com:yourgitusername/yourrepo.git
git remote -v

Похожие статьи
Git
Установка
Основы
branch: Ветки
Перейти с HTTPS на SSH
.gitignore
Необходимые Bash команды
Remote
GitHub
GitLab
Ошибки
Git Bash
Работа с API GitHub