3

When doing npm run deploy after pushing my newest copy of my application to Github, I get this error stating that it cannot find git-upload-pack. I slept on it, woke up the next morning, and the npm run deploy worked fine without error. Not, it is back again.

Just for some background, I did clone an old repo to update it from just React to React and Redux. I have changed the homepage in the package.json, used rm -rf .git to remove the git file and then used git init to re-instate it.

Any idea why this is happening?

    > todo-list@0.1.1 deploy C:\Users\Andrew\Documents\code\react-redux-todo-list                     
    > gh-pages -d build                                                                               

    git-upload-pack '.': git-upload-pack: command not found                                           
    fatal: Could not read from remote repository.                                                     

    Please make sure you have the correct access rights                                               
    and the repository exists.                                                                        

    npm ERR! code ELIFECYCLE                                                                          
    npm ERR! errno 1                                                                                  
    npm ERR! todo-list@0.1.1 deploy: `gh-pages -d build`                                              
    npm ERR! Exit status 1                                                                            
    npm ERR!                                                                                          
    npm ERR! Failed at the todo-list@0.1.1 deploy script.                                             
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:                                              
    npm ERR!     C:\Users\Andrew\AppData\Roaming\npm-cache\_logs\2018-07-29T20_55_53_405Z-debug.log   
  • Update 7/30/18: For some reason, it now let me deploy. Is this engineering?
drewkiimon
  • 591
  • 1
  • 9
  • 16

1 Answers1

2

Make sure there is no other configuration file (beside package.json) which would still reference the old GitHub repository URL. Check your git config -l.

After your git init, make sure to make at least one new commit, and push to the corresponding new GitHub repository.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250