ng github-pages:deploy is not working
OS?
Windows 10.
Versions.
angular-cli: 1.0.0-beta.22-1 node: 6.9.2 os: win32 x64 git: 1.9.4
Repro steps.
This app was generated using normal
ng new angular2-rxjs. Then I runcd angular2-rxjsthen ngserve. Worked properly in local browser. After runningng github-pages:deployA github repository was created successfully also in the master branch the source code uploaded successfully. I got the below error. There was no gh-pages branch on github repository. My local project files were also deleted after theng github-pages:deploycommand. Auto created repositoy https://github.com/asif633/angular2-rxjs byng github-pages:deploycommand.
The log given by the failure.
In order to deploy this project via GitHub Pages, we must first create a repository for it.
It's safer to use a token than to use a password so you will need to create one
Go to the following page and click "Generate new token".
https://github.com/settings/tokens
Choose "public_repo" as scope and then click "Generate token".
? Please enter GitHub token you just created (used only once to create the repo): token-hidden
? and your GitHub user name: asif633
Command failed: git rm -r
usage: git rm [options] [--] <file>...
-n, --dry-run dry run
-q, --quiet do not list removed files
--cached only remove from the index
-f, --force override the up-to-date check
-r allow recursive removal
--ignore-unmatch exit with a zero status even if nothing matched
Error: Command failed: git rm -r
usage: git rm [options] [--] <file>...
-n, --dry-run dry run
-q, --quiet do not list removed files
--cached only remove from the index
-f, --force override the up-to-date check
-r allow recursive removal
--ignore-unmatch exit with a zero status even if nothing matched
at ChildProcess.exithandler (child_process.js:206:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
I'm responsible for this and am truly sorry. I wish it hadn't been included in 1.0.0-beta.22-1.
It has been fixed as of 1.0.0-beta.23 with the following.
Your files have not been deleted. You are just on the gh-pages branch, so within the app directory run:
git checkout master
Update to 1.0.0-beta.23 and the ng github-pages:deploy command will work fine.
npm could not found [email protected]. So I downgraded after uninstalling angular-cli. I am now using [email protected]. Now ng github-pages:deploy is working fine. I will update to the latest version later. Thank you for your help.
hi i faced the same issue .. but beta 21 is not working for me
I see that [email protected] is not on npm. Apparently there are other issues with that version and another release is coming soon.
Please double check your version by running:
ng --version
Also make sure your project is not on the gh-pages branch:
git checkout master
Did all as y'all guys suggested.
Its giving the following error message.
No changes found. Deployment skipped.
Getting "Failed to create GitHub repo. Error: 401 Unauthorized" when tries to deploys angular 2 app to my organization guthub page . Asking for a token and fails with 401
ng github-pages:deploy
? Please enter GitHub token you just created (used only once to create the repo): ? and your GitHub user name: Failed to create GitHub repo. Error: 401 Unauthorized
It's not working for me too.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.