Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to get remote.origin.url, everything set up #528

Open
its-mrarsikk opened this issue Nov 6, 2023 · 0 comments
Open

Failed to get remote.origin.url, everything set up #528

its-mrarsikk opened this issue Nov 6, 2023 · 0 comments

Comments

@its-mrarsikk
Copy link

I created a TypeScript React app with create-react-app and tried deploying it with gh-pages. I have set up an origin. The remote repo exists. I have been following this tutorial. Here's more detail:

git remote -v

origin  https://github.com/its-mrarsikk/tic-tac-toes.git (fetch)
origin  https://github.com/its-mrarsikk/tic-tac-toes.git (push)

package.json scripts

"scripts": {
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build",
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },

I have also tried to force it with -r:

"scripts": {
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build -r https://github.com/its-mrarsikk/tic-tac-toes.git",
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },

Detailed output

$ npm run deploy

> tictactoes@0.1.0 predeploy
> npm run build


> tictactoes@0.1.0 build
> react-scripts build

Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  46.57 kB  build/static/js/main.0cb0ace7.js
  1.78 kB   build/static/js/787.dafb6d84.chunk.js
  515 B     build/static/css/main.f855e6bc.css

The project was built assuming it is hosted at /tic-tac-toes/.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.

Find out more about deployment here:

  https://cra.link/deployment


> tictactoes@0.1.0 deploy
> gh-pages -d build -r https://github.com/its-mrarsikk/tic-tac-toes.git

Error: 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).
    at /run/media/marcel/Хранилище/Dev/Web/tictactoes/node_modules/gh-pages/lib/git.js:214:13
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

What to do now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant