Reputation: 347
So I've recently started to work for a company and I'm trying to set a git environment for both my account, personal and the company. I found a simple solution for it which would be create a config file for multiple ssh keys. My question is, this works perfectly on the terminal, but when I try using vscode it asks me to set
Make sure you configure your 'user.name' and 'user.email' in git.
but arent these configurations globally made? is there a way for me to set these for each of my ssh keys?
Upvotes: 2
Views: 7834
Reputation: 3006
You can specify a user.name
and a user.email
for each repo. Run below command in the git repo where you need to specify the user/email
git config user.name <user-name>
git config user.email <user-email>
Personnaly, i have a global configuration (i.e. git config --global user.name
) for my work (because i have a looooot of projects to deal with), and for my personnal projects (just a few) I do the local configuration like above.
Upvotes: 3