3
1

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.

【エラー】pushした時に出た「remote: Repository not found.」 に対処してみた

Posted at

gitでpushしようとしたらエラー発生。

下記エラーコマンドが出現。

remote: Repository not found.

上記記事によると、「リモートリポジトリをgit@〜のsshのほうで登録し直すと大丈夫」とのことで、下記コマンドを実行。

git remote add origin git@github.com:ユーザー名/アプリ名.git

「これでおけ!」と思ったら、、、

補足資料(知ってたら飛ばしてください): 登録するSSHの確認方法

  1. 緑色の「Code」ボタンをクリック
  2. 「SSH」タブをクリック
    SSHの確認.png

また次のエラー。。

下記エラーコマンドが出現。

error: remote origin already exists.

「なんでやねん...」

上記記事によると、「一度originを削除し、再度originを登録すればよい。」とのことで、下記コマンドを実行。

git remote rm origin
git remote add origin https://github.com/ユーザー名/アプリ名.git
git push origin -u master

これでpush完了!!

3
1
0

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?