easy python script to perform 'git clone' for multiple git user accounts
- prepare config file under ~/.ssh
- its file structure should be like
Host gitlab.com-windsze
HostName gitlab.com
User git
PreferredAuthentications publickey
IdentityFile {YOUR SSH PRIVATE KEY LOCATION}
UseKeychain yes
AddKeysToAgent yes
- if you have multiple accounts, make sure add them all in your config file
# ---- Config for user whose name is Daryl ---
Host gitlab.com-daryl
HostName gitlab.com
User git
PreferredAuthentications publickey
IdentityFile {YOUR SSH PRIVATE KEY LOCATION}
UseKeychain yes
AddKeysToAgent yes
# ---- End of Config for user whose name is Sunny ---
# ---- Config for user whose name is Sunny ---
Host gitlab.com-sunny
HostName gitlab.com
User git
PreferredAuthentications publickey
IdentityFile {YOUR SSH PRIVATE KEY LOCATION}
UseKeychain yes
AddKeysToAgent yes
# ---- End of Config for user whose name is Sunny ---
- on your terminal
$ python GeekClone.py {git repo ssh href, for example: git@github.com:plateaukao/CalliImageView.git}
- Will ask for your username or host name
- enter your username, it will do git clone for you