GitLab gives you a complete CI/CD platform, container registry, package registry, AND a full-featured API. All free for public and private repos.
Here's what most developers don't know you can do with it.
The API: No Rate Limit Pain
Base URL: https://gitlab.com/api/v4/
Unlike GitHub (60 req/hour unauthenticated), GitLab gives you 2,000 requests per minute with a personal access token.
Search Any Public Project
curl "https://gitlab.com/api/v4/projects?search=kubernetes&order_by=stars&sort=desc" | jq '.[0] | {name, star_count, web_url}'
{
"name": "kubernetes",
"star_count": 2341,
"web_url": "https://gitlab.com/gitlab-org/kubernetes"
}
Get Repository File Contents (No Clone Needed)
curl "https://gitlab.com/api/v4/projects/278964/repository/files/README.md/raw?ref=main"
Read any file from any public repo without cloning. Project ID 278964 is GitLab itself.
List All CI/CD Pipelines
curl -H "PRIVATE-TOKEN: your_token" \
"https://gitlab.com/api/v4/projects/:id/pipelines?status=failed&per_page=5" | \
jq '.[] | {id, status, ref, created_at}'
Monitor failed pipelines across all your projects. Build a Slack alert in 10 lines.
Free Container Registry
# Push any Docker image to GitLab for free
docker login registry.gitlab.com
docker tag my-app registry.gitlab.com/username/project/my-app:latest
docker push registry.gitlab.com/username/project/my-app:latest
Unlimited private container images. Docker Hub limits you to 1 private repo on free tier.
Free Package Registry
# Publish npm packages privately
npm config set @scope:registry https://gitlab.com/api/v4/projects/:id/packages/npm/
npm publish
Also supports: PyPI, Maven, NuGet, Go, Composer, Conan, Helm, and generic packages. All free.
GitLab vs GitHub Free Tier
| Feature | GitHub Free | GitLab Free |
|---|---|---|
| Private repos | Unlimited | Unlimited |
| CI/CD minutes/month | 2,000 | 400 |
| Container registry | 500MB (packages) | 5GB |
| Package registry | 500MB | 5GB |
| API rate limit | 5,000/hr | 2,000/min |
| Pages | Yes | Yes |
| Wiki | Yes | Yes |
| Issue boards | Basic | Full Kanban |
CI/CD That Actually Works
# .gitlab-ci.yml - that's it, no GitHub Actions YAML gymnastics
test:
image: node:20
script:
- npm install
- npm test
deploy:
image: node:20
script:
- npm run build
- npx netlify deploy --prod
only:
- main
GitLab CI syntax is cleaner than GitHub Actions. Fight me.
Useful API Endpoints
| Endpoint | What it does |
|---|---|
GET /projects |
Search/list projects |
GET /projects/:id/repository/tree |
List repo files |
GET /projects/:id/repository/files/:path/raw |
Read file contents |
GET /projects/:id/pipelines |
CI/CD pipeline status |
GET /projects/:id/merge_requests |
List MRs (PRs) |
GET /projects/:id/issues |
List issues |
GET /projects/:id/registry/repositories |
Container images |
POST /projects |
Create a new project |
Getting Started
- Create a GitLab account (free)
- Generate a Personal Access Token (Settings > Access Tokens)
- Start making API calls
No credit card. No approval. 5GB of storage.
I compare developer platforms and find free alternatives to paid tools. Follow for more.
Need automated data pipelines or web scraping? Email me at spinov001@gmail.com
Also: Neon Free Postgres | Vercel Free API | Hetzner 4x More Server
NEW: I Ran an AI Agent for 16 Days — What Works
Top comments (0)