rvojcik / gitlab-project-export

Simple python project for exporting GitLab projects with Export Project funkcionality in GitLab API. Import of exported projects is also supported
GNU General Public License v3.0
103 stars 39 forks source link

API not respond well with 404 #14

Closed kukukk closed 3 years ago

kukukk commented 3 years ago

Hi,

I'm trying to use the script to export my Gitlab projects, but I get API not respond well with 404 error.

I tried to specify my project as group/project-name, but I also tried with /*. Using /* it identifies all my projects and creates the folders for them (the whole group - project names hierarchy), but it gives the same 404 error for all projects.

In Gitlab I can access the project using https://_gitlab_url/group/project-name

I also tried to export the project from Postman. Using https://_gitlab_url/api/v4/projects/2/export works, but using https://_gitlab_url/api/v4/projects/group%2Fproject-name/export returns 404.

I'm using Gitlab 13.9.2-ce.0 (Dockerized). I enabled all scopes for the Personal Access Token.

rvojcik commented 3 years ago

Hi @kukukk , Personal Access Token needs "only" API write permissions. So try to remove all others, because there is also API readonly scope.

You need only API Write permissions for token

kukukk commented 3 years ago

I created a new Personal Access Token having only the api scope, but I have the same result. Using /* for projects it manages to identify all my projects and create the folder structure for them, but not able to export them.

kukukk commented 3 years ago

Sorry, it was a mistake in my reverse proxy configuration. I had to add AllowEncodedSlashes On and nocanon to ProxyPass.

rvojcik commented 3 years ago

Thank you for letting me know. I was trying to simulate it on docker gitlab with no luck. Great to hear that you find the problem 👍😉