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 1 year has passed since last update.

WARNING: UNPROTECTED PRIVATE KEY FILE!

Posted at

下記コマンドを実行しようと思った結果

git push -u origin main

・エラー発生

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/Users/sasakiyuuya/.ssh/github' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/Users/sasakiyuuya/.ssh/github": bad permissions
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.

何やら、権限が0644でオープンすぎると、秘密鍵ファイルに他の人がアクセスできないよにする必要があると、、、
そのため、リモートリポジトリが読み取れない

権限設定が必要とのこと、

chmod コマンドを実行

参考サイト
https://qiita.com/ntkgcj/items/6450e25c5564ccaa1b95

解決方法
・鍵のパーミッションを0600にしてあげるといいらしい。

chmod 0600 ~/.ssh/github

エラー解消

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?