現象
git push origin main
Username for 'https://github.com': xxxx@gmail.com
Password for 'https://xxx%40gmail.com@github.com':
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/xxxxx/xxxx.git/'
ssh -T git@github.com
The authenticity of host 'github.com (20.27.177.113)' can't be established.
ED25519 key fingerprint is SHA256:+Dxxxxxxxxx.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
git@github.com: Permission denied (publickey).
id_rsa, id_rsa_pubも登録しているが、上のようになっていて、別のマシンでは、httpsで普通にアクセスできているのに、、、という場合は、そのアクセスできているマシンから
対策
scp .gitconfig ubuntu:
scp .gitcookie ubuntu:
scp .netrc ubuntu:
してみる。
.netrc忘れていた。
sshで入れないのは不明だが、とりあえず、httpsでアクセスできていればok