I set ./git/config file like this.
[remote "origin"]
url = https://github.com/haradashinya/dotfiles.git
It’s pushed my github’s repository but it asks for my username and password. So, I set my url to ssh style, like this:
url = git@github.com:haradashinya/dotfiles.git
But it outputs an error message saying ‘Permission denied (publickey)’.
Why this happened?
I’ve followed with https://help.github.com/articles/error-permission-denied-publickey instructions.
And I resolved my problem by ssh-add ‘my-id-rsa-path’ command.
ssh-add ~/.ssh/id_rsa;
ssh -vT git@github.com #-> success!
Thanks for help!