質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

解決済

1回答

1480閲覧

Ruby on Railsチュートリアルのssh鍵設定

mountroot

総合スコア15

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2018/09/23 09:23

初めまして、先月からITへ転職した社会人です。

Rails tutorialをやっています。

cloud9からBitBucketへpush出来ません

BitBucketにはssh鍵登録済みです

console

1ec2-user:~/environment/sample_app (master) $ git push -u origin --all 2Permission denied (publickey). 3fatal: Could not read from remote repository. 4 5Please make sure you have the correct access rights 6and the repository exists.

公開鍵が認証されていないのでしょうか?

#試してみたこと

sshの接続も試したのですがエラーのようです

console

1ec2-user:~/environment/sample_app (master) $ ssh -v -T git@bitbucket.org 2OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017 3debug1: Reading configuration data /etc/ssh/ssh_config 4debug1: /etc/ssh/ssh_config line 58: Applying options for * 5debug1: Connecting to bitbucket.org [18.205.93.2] port 22. 6debug1: Connection established. 7debug1: identity file /home/ec2-user/.ssh/id_rsa type 1 8debug1: key_load_public: No such file or directory 9debug1: identity file /home/ec2-user/.ssh/id_rsa-cert type -1 10debug1: key_load_public: No such file or directory 11debug1: identity file /home/ec2-user/.ssh/id_dsa type -1 12debug1: key_load_public: No such file or directory 13debug1: identity file /home/ec2-user/.ssh/id_dsa-cert type -1 14debug1: key_load_public: No such file or directory 15debug1: identity file /home/ec2-user/.ssh/id_ecdsa type -1 16debug1: key_load_public: No such file or directory 17debug1: identity file /home/ec2-user/.ssh/id_ecdsa-cert type -1 18debug1: key_load_public: No such file or directory 19debug1: identity file /home/ec2-user/.ssh/id_ed25519 type -1 20debug1: key_load_public: No such file or directory 21debug1: identity file /home/ec2-user/.ssh/id_ed25519-cert type -1 22debug1: Enabling compatibility mode for protocol 2.0 23debug1: Local version string SSH-2.0-OpenSSH_7.4 24debug1: Remote protocol version 2.0, remote software version conker_1.1.15-49a70a8 app-132 25debug1: no match: conker_1.1.15-49a70a8 app-132 26debug1: Authenticating to bitbucket.org:22 as 'git' 27debug1: SSH2_MSG_KEXINIT sent 28debug1: SSH2_MSG_KEXINIT received 29debug1: kex: algorithm: curve25519-sha256@libssh.org 30debug1: kex: host key algorithm: ssh-rsa 31debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none 32debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none 33debug1: kex: curve25519-sha256@libssh.org need=64 dh_need=64 34debug1: kex: curve25519-sha256@libssh.org need=64 dh_need=64 35debug1: expecting SSH2_MSG_KEX_ECDH_REPLY 36debug1: Server host key: ssh-rsa SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A 37debug1: Host 'bitbucket.org' is known and matches the RSA host key. 38debug1: Found key in /home/ec2-user/.ssh/known_hosts:1 39Warning: Permanently added the RSA host key for IP address '18.205.93.2' to the list of known hosts. 40debug1: rekey after 134217728 blocks 41debug1: SSH2_MSG_NEWKEYS sent 42debug1: expecting SSH2_MSG_NEWKEYS 43debug1: SSH2_MSG_NEWKEYS received 44debug1: rekey after 134217728 blocks 45debug1: SSH2_MSG_SERVICE_ACCEPT received 46debug1: Authentications that can continue: publickey 47debug1: Next authentication method: publickey 48debug1: Offering RSA public key: /home/ec2-user/.ssh/id_rsa 49debug1: Authentications that can continue: publickey 50debug1: Trying private key: /home/ec2-user/.ssh/id_dsa 51debug1: Trying private key: /home/ec2-user/.ssh/id_ecdsa 52debug1: Trying private key: /home/ec2-user/.ssh/id_ed25519 53debug1: No more authentication methods to try. 54Permission denied (publickey).

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

解決しました。原因はBitBacket側でssh鍵の登録情報の齟齬でした。

投稿2018/09/23 09:34

mountroot

総合スコア15

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問