I recently setup SSH keys to manage my two git accounts (bitbucket and github). However, whenever I push a commit, the author on those pushes is my computer's name rather than the respective usernames that I use for each account
Here is my config file:
#Github
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/githubssh
IdentitiesOnly yes
#Bitbucket
Host bitbucket.org
HostName bitbucket.org
User git
IdentityFile ~/.ssh/bitbucketssh
IdentitiesOnly yes
My pushes are authored by MyName
rather than by GithubUserName
or BitbucketUserName
. Running ssh -T
shows that both SSH keys are properly connected.
EDIT: fixed by doing in their corresponding repositories
$ git config user.name = "myusername"
$ git config user.email = "my email"
However, it looks like I have to do this every time I clone a new repository, is there a way to set it so that I don't have to?