DEV Community

Discussion on: How to deploy React App to GitHub Pages

 
yuribenjamin profile image
Ibrahim Ragab

Use http or ssh

Thread Thread
 
trishabernice profile image
trishabernice

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.

Thread Thread
 
trishabernice profile image
trishabernice

Do you have any suggestions for what I can do? I'll really appreciate it!

Thread Thread
 
mejimaru profile image
mejimaru • Edited
  1. go to github.com and create Repositories => your-app
  2. create your personal access token github.com/settings/tokens
  3. git remote set-url origin username:yourtoken@github.com/user...
  4. npm run deploy

or

  1. yarn add gh-pages
  2. yarn deploy
Thread Thread
 
sherazzie profile image
Sherazzie

mejimaru's solution worked if anyone ran into the error that @trishabernicer faced.

Thanks @mejimaru