我试图在 github 页上部署我的 angular 项目,突然出现错误,无法获取 remote.origin.url

I was trying to deploy my angular project on github-pages, suddenly the error says, Failed to get remote.origin.url

我试图在 github 页上部署我的 angular 项目,突然出现错误,

Failed to get remote.origin.url (task must either be run in a git repository with a configured origin remote or must be configured with the "repo" option).

我试图在项目目录中执行的命令是:

angular-cli-ghpages -d dist/news-app/ --no-silent

我也已将我最新的源代码推送到 github 存储库。

我认为您只需将遥控器添加到 git 即可:

git remote add origin <github-url>

并查看遥控器:

git remote -v