Ruby on Rails Multiple ssh on Github

17.14 Muhamad Akbar Bin Widayat 0 Comments

Hi All,
I want to share to you about setting multiple git account on your computer. Please follow me:
- Generate new ssh-key:
   ssh-keygen -t rsa -f ~/.ssh/accountB -C "your_email@youremail.com"
- Create or Modify the .ssh/config

   #office account

   Host github.com-office

     HostName github.com

       User git
         IdentityFile ~/.ssh/office



   #project account

   Host github.com-project

     HostName github.com

       User git
         IdentityFile ~/.ssh/private


- When you clone project office:
   git clone git@github.com-office:project/project.git

- When you clone project private:
  git clone git@github.com-private:project2/project2.git

I hope this article can help you.

0 komentar:

terimakasih komentarnya