Skip to content

Failed to create GitHub repo. Error: 422 Unprocessable Entity #4061

Closed

Description

@goleary

OS?

Windows 10

Versions.

angular-cli: 1.0.0-beta.25.5
node: 6.9.2
os: win32 x64
@angular/common: 2.4.3
@angular/compiler: 2.4.3
@angular/core: 2.4.3
@angular/forms: 2.4.3
@angular/http: 2.4.3
@angular/platform-browser: 2.4.3
@angular/platform-browser-dynamic: 2.4.3
@angular/router: 3.4.3
@angular/compiler-cli: 2.4.3

Repro steps.

use cli to create app.
create repo on github.
add repo as remote to newly created app
try ng github-pages:deploy
follow instructions
=> error: Failed to create GitHub repo. Error: 422 Unprocessable Entity

The log given by the failure.

Normally this include a stack trace and some more information.

Mention any other details that might be useful.

It looks like this happens because the cli attempts to create a repo itself (which already exists). Can the cli not check to see if a remote is already attached and if so just create the new branch with the deployed app? This error is not clear and requiring users to delete their repo on github (my workaround) seems like it is not the best solution.

Activity

  1. beeman commented on Jan 17, 2017

    @beeman
    Contributor

    @goleary the cli already checks if the remote is set up as you can see here.

    Can you manually run git remote -v in the project dir and see if there is an origin defined?

  2. goleary commented on Jan 17, 2017

    @goleary
    Author

    I did and there was a remote defined. I deleted my repo on github, removed the remote, and then re ran the github-pages command and it worked.

  3. filipesilva commented on Jan 17, 2017

    @filipesilva
    Contributor

    If you had a remote defined then it sounds like a bug.

  4. goleary commented on Jan 17, 2017

    @goleary
    Author

    just repeated the steps listed in my repro on the original and another machine and was unable to repro the error.

    Not sure what the cause was yesterday, perhaps this can be closed until seen again?

  5. ivanderbu2 commented on Jan 21, 2017

    @ivanderbu2

    I got the same error right now, my setup:

    MacOS Sierra Version 10.12.2

    angular-cli: 1.0.0-beta.26
    node: 7.2.0
    "@angular/common": "^2.3.1",
    "@angular/compiler": "^2.3.1",
    "@angular/core": "^2.3.1",
    "@angular/forms": "^2.3.1",
    "@angular/http": "^2.3.1",
    "@angular/platform-browser": "^2.3.1"

    Error is the same as one mentioned above, no stack trace.

    [UPDATE]
    I was able to fix this issue, it seems that angular-cli was not able to create gh branch for existing repository. After I deleted it I got an error that remote origin could not be created cause it already exists. So after I removed remote it worked fine.
    It would be helpful if this deploy command could give more feedback on exceptions and errors.

  6. filipesilva commented on Feb 3, 2017

    @filipesilva
    Contributor

    Closed via #4385.

  7. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    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.

  8. locked and limited conversation to collaborators on Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions