카테고리 없음

gitlab list all project

노트에버 2023. 2. 15. 14:49

api 형식... 콘솔 들어가서 확인하면 된다.

설치 

Advanced REST client
 
아래와 같이 url 값 입력 

 

https://gitlab.xxxx.com/api/v4/projects?per_page=100&page=1&simple=true&private_token=2124asfasdfsdaf
https://gitlab.xxxx.com/api/v4/projects?per_page=100&page=2&simple=true&private_token=2124asfasdfsdaf
https://gitlab.xxxx.com/api/v4/projects?per_page=100&page=3&simple=true&private_token=2124asfasdfsdaf

출력 된 내용을 txt 형식으로 만들어서 저장

#https http_url_to_repo 추출
#리눅스에서 명령어 사용함
jq -c -r '.[]|[.http_url_to_repo, .visibility]' re2.txt