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?

GitHub + SSH で複数アカウント切替え

Last updated at Posted at 2025-03-25

あれこれやっってみたけどキモはここ。

❯ vi ~/.ssh/config

Host github-main
  HostName github.com
  User git
  Port 22
  IdentityFile ~/.ssh/id_ed25519_main
  TCPKeepAlive yes
  IdentitiesOnly yes # need for multiple accounts

Host github-sub
  HostName github.com
  User git
  Port 22
  IdentityFile ~/.ssh/id_ed25519_sub
  TCPKeepAlive yes
  IdentitiesOnly yes # need for multiple accounts

Git HTTPS + Credential Manager がまあややこしくてクソ。

鍵の生成は ed25519 が今どきの主流なのか。

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?