2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

「git@github.com: Permission denied (publickey).」の解決方法

2
Posted at

はじめに

GitHubにpushしようとしたらエラーが発生しました。
昨日までpushできていたのに、、

前提

  • Mac
  • SSHキーは存在している

問題

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-agentに鍵を登録する

ssh-add --apple-use-keychain <秘密鍵のパス>

おわりに

昨日までpushできていたのになぜかssh-agentから鍵が削除されていました。
初めてのことだったので訳がわかりませんでした。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?