Get a single public snippet’s raw contents using curl without PRIVATE-TOKEN

How can I Get a single public snippet’s raw contents using curl without PRIVATE-TOKEN hearer?

Here is an example of such a function on gist.github.com:

curl -X GET https://gist.githubusercontent.com/vanyabrovary/4ad7e9b240ce391ebf366980642077f8/raw/a6a58d86f448e88b501bcefb441a94023638c08b/nginx.http.conf

There is link to snippet gist.github.com

Thank for your attention to this matter.

Every snippet has a raw endpoint, just add /raw after the snippet id, e.g. https://gitlab.com/-/snippets/1946017/raw :slight_smile:

2 Likes

@rpadovani I’ve tried this too, because I wan’t to curl a snippet as part of an init-process of a new Projekt.
But if I try to get the snippet via curl, I only get the source-code of an captcha (I also see it if I enter the URL in the Browser).

So how can I download the snippet without running in those recaptcha-checks?