failed to add gitlab webhook

Gijsbert dos Santos's Avatar

Gijsbert dos Santos

Mar 24, 2020 @ 11:55 AM

When trying to add a new gitlab project, I got this message:

Error adding webhook to GitLab repository: HTTP POST to https://gitlab.com/api/v4/projects/17221567/hooks returned status code 422: Unprocessable Entity Full response body: {"error":"Invalid url given"}

As far as I can tell installing the hook with gitlab fails, any clue what's going on here?

  1. Support Staff 1 Posted by Feodor Fitsner on Mar 24, 2020 @ 07:26 PM

    Feodor Fitsner's Avatar

    Hi Gijsbert,

    Are you getting this error for other GitLab repos? Is it intermittent or you are still experiencing the issue?

    I've tried to add a few GitLab projects under my test account and didn't get such an error.

  2. 2 Posted by Gijsbert Dos Sa... on Mar 25, 2020 @ 12:26 AM

    Gijsbert Dos Santos's Avatar

    Hi Feodor,

    I just tried creating a new public empty repository and it's still not
    working, exactly the same error.

    I'm using firefox on windows (might be relevant idk)

    Kind regards,
    - Gijsbert dos Santos

    Op di 24 mrt. 2020 om 20:26 schreef Feodor Fitsner <
    [email blocked]>:

  3. Support Staff 3 Posted by Feodor Fitsner on Mar 25, 2020 @ 12:36 AM

    Feodor Fitsner's Avatar

    Can you try adding webhook to that project by calling an API with curl. You can generate personal access token: https://docs.gitlab.com/ee/api/README.html#personal-access-tokens

    POST https://gitlab.com/api/v4/projects/17221567/hooks
    
    {
        "url": "https://ci.appveyor.com/api/gitlab/webhook?id=aaabbbccc",
        "push_events": true,
        "tag_push_events": true,
        "enable_ssl_verification": true,
        "merge_requests_events": true
    }
    
  4. Feodor Fitsner closed this discussion on May 25, 2020 @ 09:03 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac