Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #3004

Closed
Open
Created Feb 15, 2013 by Administrator@rootOwner

API: error 500 when accessing branches of a newly created project

Created by: justahero

On a newly created project accessing the branches via API (GET /projects/:id/repository/branches) results in a 500 error.

The method user_project.repo returns nil. It calls Project.repository and can not create a valid repository, because the call to Repositoy.new throws an error.

I added a user via admin account and created a new project. Accessing the project via web client lists the necessary steps to push the first commit to the repository. When I use the API call GET /projects/:id/repository/branches with curl it returns a 500 error. Unfortunately I could not reproduce this behaviour in a spec test, it returns 200 Ok.

Assignee
Assign to
Time tracking