前提・実現したいこと
githubにローカル環境で作成したディレクトリを投稿したい。
ローカル環境でRailsアプリを作成し、そちらをgithubに掲載したく思っております。
発生している問題・エラーメッセージ
git remote addを行うと、 「fatal :remote origin already exists」 と表示されます。 これを、「remote originがすでに存在している」と解釈し、 「git push origin master」コマンドを行いました。 すると、 「Permission denied (publickey). fatal: The remote end hung up unexpectedly」 と表示されます。 ここで現時点で、ぐぐっても何が対処法となるか、判断できず、 知恵をお借りしたく質問させていただきます。 何卒よろしくお願いいたします。
該当のソースコード
[vagrant@localhost myapp]$ git init
Reinitialized existing Git repository in /home/vagrant/rails_lessons/myapp/.git/
[vagrant@localhost myapp]$ git add .
[vagrant@localhost myapp]$ git commit -m "Initial Commit"
On branch master
nothing to commit (working directory clean)
[vagrant@localhost myapp]$ git remote add origin https://github.com/baramatsubonzo/rails_app.git
fatal: remote origin already exists.
[vagrant@localhost myapp]$ git push origin master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/08/06 01:28