1
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.

GitHubのアクセストークンを再生成したときのVScodeの再ログイン方法

Posted at

トークンを再生成するころにはやり方を忘れているので覚え書き。

方法1

GitHubのトークン再生成後、VScodeのターミナルを開きGitHubのユーザー名とメールアドレスを再設定して認証し直す。

git config --global user.name ***
git config --global user.email ***

この二つを設定した後、GitHubにプッシュするとアカウント認証を求められるので、ブラウザに遷移し認証する。

方法2

GitHubのトークン再生成後、VScodeのターミナルを開きremote.origin.urlを再設定する。

git remote.origin.url https://*ユーザー名*:*トークン*@github.com/****/****.git

こっちだとコマンド打ったらトークンが丸見えなので方法1の方がいいと思う。

1
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
1
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?