@neva29101 (NEVA)

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

GitHubにPushしたファイルの更新ができません。どうしたらPush(更新)出来ますか?

git bashに入力したもの

git push origin main

log

remote: Repository not found.
fatal: repository '//GitHubのURL' not found

更新の流れ

git add -A
git commit -m "//commit"
git push origin main //ここでエラー

分かる方いらっしゃったら、教えてください

0 likes

2Answer

originのリモートリポジトリをhttpsで設定していると起きることがあるようです。
その場合、以下の記事が参考になるでしょう。

1Like

Comments

  1. @neva29101

    Questioner

    ありがとうございます。参考になりました。

git remote -v
するといかがでしょうか。

おそらく以下の操作に誤りがあったものと推測します。

git remote add origin https://github.com/<OWNER>/<REPOSITORY>.git
or
git remote add origin git@github.com:<OWNER>/<REPOSITORY>.git

originはすでに設定されているように思いますので、

git remote set-url origin https://github.com/<OWNER>/<REPOSITORY>.git
or
git remote set-url origin git@github.com:<OWNER>/<REPOSITORY>.git

で正しいURLに設定し直してください。

<OWNER><REPOSITORY>は、例ですので、存在する値に読み替えてください。

参考になるページをご紹介します。

0Like

Comments

  1. @neva29101

    Questioner

    ありがとうございます。出来ました。

Your answer might help someone💌