Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

1
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.

【Bitbucket】SSH公開鍵の作成

Last updated at Posted at 2022-03-16

新しいPCになったので新しくリポジトリをgit cloneしようと思ったら

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

になった.原因はローカルとリモートリポジトリで同じ公開鍵を保持してないからだ.
というわけで新しく公開鍵作って登録した.

鍵の作成

$ ssh-keygen -t rsa

作った鍵をクリップボードへコピー

$ pbcopy < ~/.ssh/id_rsa.pub

リモートリポジトリ側で鍵を登録
スクリーンショット 2022-03-16 16.51.53.png

以上.認証が通ってリポジトリのクローンができるようになった.

めでたし

1
0
1

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