git push origin masterしようとしたらPermission denied (publickey) fatal: Could not read from remote repository.

#問題

herokuでデプロイは完了しているものの今度はgit hubの方でpushができない。
具体的には`git push origin master`をしても、

```
Permission denied (publickey) 
fatal: Could not read from remote repository.
```

と返されてしまう。

#現状

`ssh -vT git@github.com`

```
OpenSSH_7.2p2, LibreSSL 2.4.1
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: Connecting to github.com [192.30.253.113] port 22.
debug1: Connection established.
debug1: identity file /Users/hironorisama/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/hironorisama/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/hironorisama/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/hironorisama/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/hironorisama/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/hironorisama/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/hironorisama/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/hironorisama/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2
debug1: Remote protocol version 2.0, remote software version libssh-0.7.0
debug1: no match: libssh-0.7.0
debug1: Authenticating to github.com:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /Users/hironorisama/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/hironorisama/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /Users/hironorisama/.ssh/id_dsa
debug1: Trying private key: /Users/hironorisama/.ssh/id_ecdsa
debug1: Trying private key: /Users/hironorisama/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).
```

#仮説
publickeyかssh key周辺のミスマッチなのでは？もしくはそもそもない？

#原因

- <a href="http://stackoverflow.com/questions/29612977/what-does-the-agent-has-no-identities-mean" target="_blank">What does 'the agent has no identities' mean?</a>
- <a href="http://stackoverflow.com/questions/26505980/github-permission-denied-ssh-add-agent-has-no-identities" target="_blank">Github permission denied: ssh add agent has no identities</a>
- <a href="http://askubuntu.com/questions/363404/ssh-add-command-does-not-add-my-identity-to-ssh-agent" target="_blank">ssh-add command does not add my identity to ssh-agent</a>

を参考にしてもらうとわかると思う。

>In summary, when ssh-add -l returns The agent has no identities it means that keys used by ssh (stored in files such as `~/.ssh/id_rsa`, `~/.ssh/id_dsa`, etc) are either missing, they are not known to the authentication agent (ssh-agent), or their permissions are set incorrectly (e.g., world writable).
`ssh-add -l`で`The agent has no identities`が帰ってくるということはssh keyがそもそもないのか、ssh-agentにそのkeyが知れ渡っていない、もしくはpermision周辺が正しく設定されていないかのどれかである。

#対策
<a href="http://qiita.com/u1and0/items/b9ca6496045b961f097f" target="_blank">git公開鍵の追加方法</a>を参考に新たにssh keyを発行してgithub上で乗せる。プロジェクトディレクトリに戻ってadd、commit、pushする。

#参考にしたリンク

- <a href="https://help.github.com/articles/error-permission-denied-publickey/" target="_blank">Error: Permission denied (publickey)</a>
- <a href="http://qiita.com/u1and0/items/b9ca6496045b961f097f" target="_blank">git公開鍵の追加方法</a>
- <a href="http://sbkro.hatenablog.jp/entry/2013/04/23/231312" target="_blank">GithubでSSH通信した時に「Permission denied (publickey).」が発生した時の対処方法。</a>
- <a href="http://vdeep.net/github" target="_blank">GitHubの登録手順、SSH設定＆リポジトリをclone,pushまで<a>