事象
- GitHub から clone しようとすると、"Permission denied (publickey). fatal: Could not read from remote repository." と怒られる。
% git clone git@github.com:yoheia/redshift_concurrent_query_executer.git
Cloning into 'redshift_concurrent_query_executer'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
原因
- マシンをリプレースして、~/.ssh/config に以下を書いてなかった。
Host github.com
User git
Port 22
Hostname github.com
IdentityFile ~/.ssh/id_rsa
TCPKeepAlive yes
IdentitiesOnly yes