Search code examples
reactjsgitgithubdeploymentaccess-token

Can not deploy create-react-app with token


I have been trying to deploy create-react-app, but got an error

fatal: repository 'https://github.com/charyyev2000/Portfolio-React.git/' not found

then I created a token and tried to deploy with that,

git remote add origin https://<TOKEN>@github.com/charyyev2000/Portfolio-React.git

again got an error;

Deleted repository, created again and tried to deploy, again got the same error

fatal: repository 'https://github.com/charyyev2000/Portfolio-React.git/' not found

What did I do wrong? or, is there something wrong with my homepage in packages.json?

"homepage": "https://charyyev2000.github.io/Portfolio-React",

I cant deploy from any other of my repositories too. What should I do now.


Solution

  • You are new comer in Git/GitHub tools, I hope you can done this task.

    Your remote repository URL is https://github.com/charyyev2000/Portfolio-React

    Solution 1: Create a new repository on the command line

    echo "# Portfolio-React" >> README.md
    git init
    git add README.md
    git commit -m "first commit"
    git branch -M main
    git remote add origin https://github.com/charyyev2000/Portfolio-React.git
    git push -u origin main
    

    Solution 2: (I think you will prefer this solution, because your source code is exist).

    Push an existing repository from the command line

    git remote add origin https://github.com/charyyev2000/Portfolio-React.git
    git branch -M main
    git push -u origin main
    

    Let's follow the guide what you see likes this

    enter image description here

    P/S: Sometime, you need

    git add .
    git commit -m"foo"
    git push -v
    

    or you see any guide on your console screen, let's follow guide what you see.