No problem git remote - v
Will display origin and the wrong remote url
To delete it git remote rm origin
Then check again git remote - v
Will display nothing time to add the right one
Happy Hacking
I did this:
Trishas-MBP-2:src TrishaBernice$ git remote rm origin
Trishas-MBP-2:src TrishaBernice$ git remote -v
Trishas-MBP-2:src TrishaBernice$ git remote add origin git@github.com:trishabernice/portfolio.git
Trishas-MBP-2:src TrishaBernice$ npm run deploy
and I still got this...
Cloning into 'node_modules/gh-pages/.cache/git@github.com!Yuribenjamin!my-app.git'... git@github.com: Permission denied (publickey).
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! my-app@0.1.0 deploy: gh-pages -d build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app@0.1.0 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! /Users/TrishaBernice/.npm/_logs/2020-06-15T17_01_16_913Z-debug.log
Is there anything else I can try to fix the issue?
Earlier I did this:
Trishas-MBP-2:src TrishaBernice$ git remote add origin github.com/trishabernice/portfolio...
and i did git remote rm origin and then added the one for ssh and I still got the same error.
In response to @trishabernice
's problem with node_modules/.cache/gh-pages, a fix with this for me was to simply remove/delete node_modules/.cache/gh-pages, then execute npm run deploy once more.
No problem
git remote - v
Will display origin and the wrong remote url
To delete it
git remote rm origin
Then check again
git remote - v
Will display nothing time to add the right one
Happy Hacking
Hi Ibrahim, Thanks for the fast reply!
I did this:
Trishas-MBP-2:src TrishaBernice$ git remote rm origin
Trishas-MBP-2:src TrishaBernice$ git remote -v
Trishas-MBP-2:src TrishaBernice$ git remote add origin git@github.com:trishabernice/portfolio.git
Trishas-MBP-2:src TrishaBernice$ npm run deploy
and I still got this...
Cloning into 'node_modules/gh-pages/.cache/git@github.com!Yuribenjamin!my-app.git'...
git@github.com: Permission denied (publickey).
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! my-app@0.1.0 deploy:
gh-pages -d build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app@0.1.0 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! /Users/TrishaBernice/.npm/_logs/2020-06-15T17_01_16_913Z-debug.log
Is there anything else I can try to fix the issue?
Use http or ssh
Earlier I did this:
Trishas-MBP-2:src TrishaBernice$ git remote add origin github.com/trishabernice/portfolio...
and i did git remote rm origin and then added the one for ssh and I still got the same error.
Do you have any suggestions for what I can do? I'll really appreciate it!
or
mejimaru's solution worked if anyone ran into the error that @trishabernicer faced.
Thanks @mejimaru
In response to @trishabernice 's problem with
node_modules/.cache/gh-pages
, a fix with this for me was to simply remove/deletenode_modules/.cache/gh-pages
, then executenpm run deploy
once more.This issue I'm referring to (and its answer) can be found on StackOverflow here: stackoverflow.com/questions/639645...