0
0

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 3 years have passed since last update.

Github Pages "Failed to get remote.origin.url"の対処方法

Posted at

エラー内容

Reactの勉強のためこちらの教材でアプリを作成後、Github Pagesにデプロイする箇所で以下のエラーが発生した。

$ gh-pages -d build
Failed to get remote.origin.url (task must either be run in a git repository with a configured origin remote or must be configured with the "repo" option).
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

環境

macOS Monterey 12.3.1
react@18.1.0
yarn 1.22.17

原因

Githubリポジトリが登録されていなかった。

対処方法

Githubでリポジトリ作成
→ ターミナルでgit remote add origin <リポジトリのURL>を入力
→ 再デプロイyarn run deploy
→ 無事にデプロイ出来ました。

参考

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?