将我的网站部署到Github页面后,URL出现严重问题,我不确定如何修复

问题描述 投票:-1回答:1

看看更新!!

我试图将我的ReactJS页面部署到Github,然后遵循规则来开球。

来自:https://facebook.github.io/create-react-app/docs/deploymenthttps://medium.freecodecamp.org/surge-vs-github-pages-deploying-a-create-react-app-project-c0ecbf317089

在第一次尝试之后,我在第二次尝试时得到的错误是:

fatal: HttpRequestException encountered.
   An error occurred while sending the request.
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No error

会发生什么事?

编辑:好的,我现在有一个网站,但URL是myname.github.io/myname.github.io。我怎样才能解决这个问题?

reactjs github github-pages
1个回答
0
投票

https://facebook.github.io/create-react-app/docs/deployment#troubleshooting

取自这里:

尝试添加新的个人访问令牌:

git remote set-url origin https://<user>:<token>@github.com/<user>/<repo>

。再次尝试npm run deploy

=======看到原始问题的添加后编辑。

所以我认为这是一个项目页面...但它是一个github.io页面。在这种情况下,只需将您的应用程序推送到master(build / dist文件夹),如果要在master分支中清理,则将其他所有内容(特别是源代码)移动到其他分支。更多信息:https://pages.github.com/

你遇到了什么https://yourname.github.io/yourproject是一个项目页面,所以如果你正在构建一个项目,你可以自动将它添加到你的主github页面(你的github.io)。

© www.soinside.com 2019 - 2024. All rights reserved.