Advertisement
Guest User

Untitled

a guest
Sep 15th, 2015
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. Create separate SSH key for your personal account and your company. Named them with different extensions in your .ssh folder. Upload them to your github account and finally create a config file for your SSH
  2. Create a config file in ~/.ssh/
  3.  
  4. vim config:
  5.  
  6. # PERSONAL ACCOUNT Github
  7. Host github.com-COOL
  8. HostName github.com
  9. User git
  10. IdentityFile ~/.ssh/id_rsa_COOL
  11.  
  12. # COMPANY GitHub
  13. Host github.com-COMPANY
  14. HostName github.com
  15. User git
  16. IdentityFile ~/.ssh/id_rsa_COMPANY
  17.  
  18. Setting up different config settings for each project:
  19.  
  20. CD to a project folder:
  21.  
  22. git config user.name "Your Name Here"
  23. git config user.email your@email.com
  24.  
  25. Whereas you can have global Git Config:
  26.  
  27. git config --global user.name "Your Name Here"
  28. git config --global user.email your@email.com
  29.  
  30.  
  31. Example:
  32. git clone git@github.com-COMPANY:COMPANY/
  33.  
  34. git cline git@github.com-COOL:USERNAME
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement