Q&A
rails tutorialの『1.4 Gitによるバージョン管理』で詰まってしまいました。
下記の説明が全く分かりません。
「公開鍵の追加が終わったら、[作成] をクリックして新しいリポジトリを作成します 図 1.19)。プロジェクトの情報を入力したら、[これは非公開リポジトリです] のチェックボックスが「オン」になっていることを確認します (オフにしないでください!)。[リポジトリの作成] をクリックすると画面が遷移し、[Let’s put some bits in your bucket] と表示されます。その後、ページ下部にある [Push your local repository to Bitbucket] の指示にしたがってコマンドを入力します。(リスト 1.11)。リスト 1.11のように表示されない場合は、公開鍵が正しく追加されていない可能性がありますので、公開鍵の追加をやり直すことをオススメします。リポジトリをプッシュするときに「Are you sure you want to continue connecting (yes/no)?」と表示されたらyesと入力します。」
リスト 1.11: Bitbucketへのリポジトリ追加とリポジトリへのプッシュ
$ git remote add origin git@bitbucket.org:ユーザー名/hello_app.git
$ git push -u origin --all
発生している問題・エラーメッセージ
ec2-user:~/environment/hello_app (master) $ git push -u origin --all
The authenticity of host 'bitbucket.org (104.192.143.3)' can't be established.
RSA key fingerprint is SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A.
RSA key fingerprint is MD5:97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'bitbucket.org,104.192.143.3' (RSA) to the list of known hosts.
Enter passphrase for key '/home/ec2-user/.ssh/id_rsa':
To bitbucket.org:hsmt11/hello_app.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@bitbucket.org:hsmt11/hello_app.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
### 該当のソースコード ```ここに言語名を入力 ソースコード
試したこと
ページ下部にある [Push your local repository to Bitbucket] の指示にしたがってコマンドを入力します。という部分を実行したのですが、リポジトリのクローンができず、リスト1.11をコピペしてもrejectと表示されます。
補足情報(FW/ツールのバージョンなど)
初心者でgitの時点で分からなくて途方に暮れています。どうか回答お願いします。
回答1件
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
退会済みユーザー
2018/05/24 14:49
2018/05/24 14:54
退会済みユーザー
2018/05/24 15:00
2018/05/24 15:15
退会済みユーザー
2018/05/24 15:22
2018/05/24 21:13 編集