Search code examples
gitlabcode-snippets

Gitlab snippets returning 404


All over a sudden all my Gitlab snippets are inaccessible on a project where I am the maintainer even when am logged in.

There are available, I see them listed on the repository but accessing them returns 404 every time.

Is there a way to revert this?


Solution

  • Apparently the issue is that there's a wrong url in the snippets list.

    Issue:

    Missing user and project details.

    Actual snippet link

    https://gitlab.com/snippets/1234567

    Working snippet link

    https://gitlab.com/jdoe/hello-world/snippets/1234567

    Solution:

    Manually add the <username>/<project> like jdoe/hello-world into the link

    Hope this saves someone else's day.