Skip to content

Instantly share code, notes, and snippets.

@trsqxyz
Last active December 20, 2015 14:49
Show Gist options
  • Save trsqxyz/6149683 to your computer and use it in GitHub Desktop.
Save trsqxyz/6149683 to your computer and use it in GitHub Desktop.
git push や pull をしたときに permission denied (publickey) が出てしまった場合

公開鍵の設定をして

ssh -T [email protected]

も成功していたけど git pushgit pull もできなくなった
公開鍵の再作成 再登録後に ~/.ssh/ に config をつくって

Host github.com
User git
Port 22
Hostname github.com
port 22
IdentityFile ~/.ssh/id_rsa
TCPKeepAlive yes
IdentitiesOnly yes
Host gist.github.com
User git
Port 22
Hostname gist.github.com
port 22 IdentityFile ~/.ssh/id_rsa
TCPKeepAlive yes
IdentitiesOnly yes

って書いたら出来た もしかしたら config の作成だけで済んだかもしれない

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment