現在Rails tutorialに従ってRuby on Railsを勉強しているのですがBitbucketへのリポジトリの追加およびプッシュにてつまづいています。
具体的には
$ git remote add origin git@bitbucket.org:<username>/hello_app.git
$ git push -u origin --all
これらを実行すると一行目は上手くいって二行目を実行すると
To bitbucket.org:k1o0b1a9/hello_app.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@bitbucket.org:<username>/hello_app.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
とエラーが表示され先に進めません。
ヒントに書いてあるように
$git pull master origin
と入力してみたのですが
fatal: 'master' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
というエラーが表示されプルもできません。
公開鍵は
https://qiita.com/shizuma/items/2b2f873a0034839e47ce
このページに従って作成し、Rails tutorialの手順に従って設定したので問題はないと思います。
どなたか解決方法が分かる方がいらっしゃったら教えていただけると助かります。

回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/03/26 08:08
2018/03/26 08:09
2018/03/26 10:19