0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Atomでgit pushするときにユーザー名とパスワードが求められてもpushできないとき

0
Posted at

【Git】2021年8月13日からGitでリモートにアクセスができなくなった。Support for password authentication was removed on August 13, 2021.

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: unable to access '/': The requested URL returned error: 403

こういったエラー文が出てgit pushできなかったのですが、
紐解いていったらなんてことなかったので、
書き留めておきます。

簡単に言うと、
ユーザーIDとパスワードじゃあログインさせないからトークン使え
ってことなんですが、トークンに切り替える方法が書かれてませんでした。
てっきりAtomのgit使うときのトークンかと思ったら違ってました。

【Git】push時に毎回パスワードを求められる - Qiita

$ git remote set-url origin git@*******

この方法でまずSSH通信に切り替えました。

GitHub アカウントへの新しい SSH キーの追加 - GitHub Docs
SSH 接続をテストする - GitHub Docs
あと新しいPCだったので上記のリンクの手順でSSHキーを作成、アカウントに追加。

$ ssh-keygen -t ed25519 -C "your_email@example.com"
$ cat ~/.ssh/id_ed25519.pub

あとはこれをコピペしてGithubのアカウントに追加すれば完了です。
よき開発ライフを。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?