gitlabhq/gitlabhq — Issue #368: Error 404 in some code views
Author: trtwn
Created: 2012-02-03 08:48:22+00:00
State: open

Hey,

I just installed GitLab on my server and setup some project. The ones I created from scratch (with a new empty git repo) work just fine, but the ones that I pushed my existing git repo to are raising an Error 404 when I switch to the Code view.

I did the following steps to migrate from my existing git server to the new one (w/ GitLab):

I checked out all the remote branches to my local machine
> git checkout -t origin/branch

I removed the existing remote
> git remote rm origin

I added the new (GitLab) remote
> git remote add origin git@example.com:repository.git

I switched to the master branch and pushed it to the new remote
> git checkout master
> git push -u origin master

Just to be sure, I set the following
> git remote set-head origin master
> git config master.merge refs/heads/master
> git config master.remote origin

Lastly, I pushed my other branches to the remote
> git checkout other_branch
> git push origin other_branch
> …

I cloned the git repository and the master and all other branches I pushed, are on the new server and I can view all the commits in the Commit View in GitLab: http://example.com/myproject/commits?ref=master - so the git repository seems to be well.
For some of the projects, I noticed that I can view some of the branches when I access http://example.com/myproject/other_branch/tree. For other projects, every branch raises the 404. But for each of the projects that I pushed my existing git repo to, there's a 404 when I try to view the master branch (http://example.com/myproject/master/tree).

This is the output of the server log:
> Started GET "/project/master/tree" for 12.34.56.78 at 2012-02-03 09:25:42 +0100
> Processing by RefsController#tree as HTML
> Parameters: {"project_id"=>"secureme_frontend", "id"=>"master"}
> Rendered refs/_tree_item.html.haml (188.6ms)
> Rendered refs/_tree_item.html.haml (5.7ms)
> Rendered refs/_tree_item.html.haml (9.2ms)
> Rendered refs/_tree_item.html.haml (18.8ms)
> Rendered refs/_tree_item.html.haml (14.9ms)
> Rendered refs/_tree_item.html.haml (16.5ms)
> Rendered refs/_tree_item.html.haml (6.0ms)
> Rendered refs/_tree_item.html.haml (14.1ms)
> Rendered refs/_tree.html.haml (287.7ms)
> Rendered refs/tree.html.haml within layouts/project (334.3ms)
> Rendered public/404.html (0.5ms)
> Completed 404 Not Found in 653ms (Views: 2.2ms | ActiveRecord: 3.2ms)

Any hints on what I could try are appreciated. :)

Thanks