Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to get remote.origin.url

When trying to use gh-pages to deploy a react app I get the following error

...
$ 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).
...

The remote is set as origin

$ git remote -v
origin  https://github.com/{user_name}/{repo_name} (fetch)
origin  https://github.com/{user_name}/{repo_name} (push)
like image 717
naveeng2402 Avatar asked Oct 25 '25 02:10

naveeng2402


1 Answers

The solution for me was that I had a remote origin set, however it would throw me this error when my project folder was located on an external hard drive. Made a new react project on my local hard drive and now it works despite everything else being the same.

like image 85
happiestchicken Avatar answered Oct 26 '25 17:10

happiestchicken