Check if Gitlab repo is private
Created by: gurupras
Hi, we're encouraging people to use Gitlab to host their repositories for a class. However, when they submit their code for grading, we attempt to detect if their repo is accessible publicly.
It looks like gitlab does not support such a query through its API. A user only appears to have access to projects that are owned by him.
The API endpoint /project/namespace/id does not seem to work.
For example:
The following request:
curl https://gitlab.com/api/v3/projects/gurupras/testproject?private_token=...
fails despite this repository being marked public.
However,
curl https://gitlab.com/api/v3/projects?private_token=...
succeeds and returns []
(I have no repositories on the account I'm testing with)