🐈

GitHubアカウント使い分けメモ

に公開

使い分け

いつも複数のGitHubアカウントを使用しているため、新しいアカウント作成時の設定方法をメモ書き

レポジトリ設定

ローカルの名前・メール設定

git config --local user.name [your_username]
git config --local user.email [your_email]

鍵の生成(公開鍵pub側はGitHub側でDeploy Key)

ssh-keygen -t ed25519 -f [your_file_name]

config登録

vi ~/.ssh/config

config反映

git remote set-url origin git@[config_name]:[username]/[repo_name].git 

Discussion