# Github Multi Account

By [Sukey](https://paragraph.com/@sukey) · 2024-11-19

---

*   Create ssh for github account:
    
    *   ssh-keygen -t rsa -b 4096 -C "[account@example.com](mailto:account@example.com)"
        
*   Add account into `~/.ssh/config`
    
*   Clone repo
    
    *   git clone git@github-first:username/repository.git
        
*   Config github account:
    
    *   git config user.name "Your Name for Account"
        
    *   git config user.email "[account@example.com](mailto:account@example.com)"
        
*   Check git ssh configuration whether it matches to ssh key:
    
    *   echo $GIT\_SSH\_COMMAND
        
*   If needed, change repo to SSH URL:
    
*   git remote set-url origin [git@github.com](mailto:git@github.com):xxx/xxxx.git

---

*Originally published on [Sukey](https://paragraph.com/@sukey/github-multi-account)*
