* Generate new ssh:
ssh-keygen -t rsa -C "your-email-address"
> Use a new file name like:
id_rsa_OTHERUSER
* Add new ssh:
ssh-add ~/.ssh/id_rsa_OTHERUSER
* Open/create a
config
file
vim ~/.ssh/config
* Add a new Host configuration like:
----------------
Host github-OTHERUSER
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_OTHERUSER
* Update/clone your repository with this format:
*
git remote [add or set-url] origin git@github-OTHERUSER:Company/testing.git
*
git clone git@github-OTHERUSER:Company/testing.git
> The
github-OTHERUSER
will is reference to config file thats point to otheruser ssh file.
git config user.name "OTHER_USERNAME"
git config user.email "OTHER@EMAIL"
Created By
blog.ridermansb.me
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by ridermansb