1) Create a new key using ssh-keygen -t rsa -C "user2@user2.com"
Be careful that you don’t overwrite your existing key for your personal account. Instead, when prompted, save the file as id_rsa_user2.
2) Add these new keys with ssh-add command:
Examples:
ssh-add ~/.ssh/id_rsa_user1
ssh-add ~/.ssh/id_rsa_user2
3) Modify the SSH config:
a) Create a config file:
cd ~/.ssh/
touch config
b) Add the following data into it:
Host git.assembla.com
HostName git.assembla.com
User Git
IdentityFile ~/.ssh/user1
Host git.assembla-user2
HostName git.assembla.com
User Git
IdentityFile ~/.ssh/user2
4) Configure Git for a new global username:
git config --global user.name "user2"
git config --global user.email "user2@user2.com"
Example:
git config --global gshabbir
git config --global gulam@assembla.com
5) Push your files using a normal Git flow.
Have questions? Email us at support@assembla.com
Comments
0 comments
Article is closed for comments.