List all gitlab projects into a file

Hi Folks,

I was wondering if we can generate a file that contains all the list of project for our gitlab instance. I see we can run this command on the server:

sudo gitlab-rake gitlab:list_repos

How to I write the output into a file? I want to basically have a list of all our projects on a file.

Appreciate your response.

Thank!

Hey @lorenze,

Never used the command before so I dont know the exact output but if the output is good enough just redirect stdout

sudo gitlab-rake gitlab:list_repos > myrepos.txt

You can also use the GitLab REST API or GraphQL API from a normal client via curl or any programming language which can do http requests like for example python.

Greetings

Tonka

1 Like