0
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?

More than 3 years have passed since last update.

GitHubにpushする際にPermission Errorが生じる

0
Last updated at Posted at 2023-03-18

GitHubにpushする際にPermission Errorが生じる

久々にpush使用と思ったら、突然のエラー!!

sourcetreeを現在使用しています。
・sourecetreeとGitHubの紐付け
・リモートリポジトリを再度設定
など試したが、ダメでした😭

最終的に対処できたのでその方法を記載

ターミナルにて

$ ls ~/.ssh/ 
〇〇-GitHub 〇〇-GitHub.pub

実行すると 〇〇-GitHub と 〇〇-GitHub.pub と表示されるはず(その他にも表示されていても問題ないです)。
※〇〇はパソコンによって表示が変わります。

これらは鍵で、登録しないとGitHubにpushができません。

そして、以下を実行します。
※〇〇のところは上の値を参考にしてください。

$ ssh-add -K ~/.ssh/〇〇-GitHub

最後に以下を実行してください。

$ ssh -T git@github.com

そうしたところ、今回の問題は解決されました。

0
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
0
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?