I was finally able to fix this by using the instructions at 
(https://forum.gitlab.com/t/how-can-i-delete-a-repository-and-push-a-new-one/690/3)
 
to remove the existing repo and push the working one in it's place.  Once 
that was done the project was back in perfect condition with wiki and 
issues intact.

On Wednesday, August 19, 2015 at 4:52:49 PM UTC-7, Donald Campbell wrote:
>
> I'm running the Omnibus version of Gitlab 7.13.2 in a VM.  I'm developing 
> locally and pushing to the VM as the git remote.  Recently I had an 
> unexpected shutdown and that gitlab project got messed up.
>
> I can still create other projects and they work fine, but this one has the 
> following problems.
>
> When attempting to push, the result is:
> GitLab: API is not accessible
> fatal: Could not read from remote repository.
>
> Please make sure you have the correct access rights
> and the repository exists.
>
> When attempting to browse the project or it's wiki in the Gitlab dashboard 
> (or anywhere else) the result is a 500 error with "Whoops, something went 
> wrong on our end."
>
> I attempted restarting gitlab with no changes, following the 
> troubleshooting guide and running: sudo gitlab-rake gitlab:check it fails 
> with:
> GitLab Shell version >= 2.6.3 ? ... OK (2.6.3)
> Repo base directory exists? ... yes
> Repo base directory is a symlink? ... no
> Repo base owned by git:git? ... yes
> Repo base access is drwxrws---? ... yes
> Satellites access is drwxr-x---? ... yes
> hooks directories in repos are links: ... 
> Hive Support / Scheduler ... rake aborted!
> Rugged::OdbError: Object not found - failed to find pack entry 
> (747f89f16ac88f241494a931cce4a1b477589430)
> /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/gitlab_git-7.2.5/lib/gitlab_git/repository.rb:56:in
>  
> `target'
> /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/gitlab_git-7.2.5/lib/gitlab_git/repository.rb:56:in
>  
> `block in branches'
> /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/gitlab_git-7.2.5/lib/gitlab_git/repository.rb:55:in
>  
> `each'
> /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/gitlab_git-7.2.5/lib/gitlab_git/repository.rb:55:in
>  
> `map'
> /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/gitlab_git-7.2.5/lib/gitlab_git/repository.rb:55:in
>  
> `branches'
> /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/gitlab_git-7.2.5/lib/gitlab_git/repository.rb:50:in
>  
> `branch_names'
> /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/gitlab_git-7.2.5/lib/gitlab_git/repository.rb:116:in
>  
> `discover_default_branch'
> /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/gitlab_git-7.2.5/lib/gitlab_git/repository.rb:33:in
>  
> `initialize'
> /opt/gitlab/embedded/service/gitlab-rails/app/models/repository.rb:11:in 
> `new'
> /opt/gitlab/embedded/service/gitlab-rails/app/models/repository.rb:11:in 
> `initialize'
> /opt/gitlab/embedded/service/gitlab-rails/app/models/project.rb:263:in 
> `new'
> /opt/gitlab/embedded/service/gitlab-rails/app/models/project.rb:263:in 
> `repository'
> /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:484:in 
> `block in check_repos_hooks_directory_is_link'
> /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/relation/batches.rb:52:in
>  
> `block (2 levels) in find_each'
> /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/relation/batches.rb:52:in
>  
> `each'
> /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/relation/batches.rb:52:in
>  
> `block in find_each'
> /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/relation/batches.rb:126:in
>  
> `find_in_batches'
> /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/relation/batches.rb:51:in
>  
> `find_each'
> /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/querying.rb:9:in
>  
> `find_each'
> /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:482:in 
> `check_repos_hooks_directory_is_link'
> /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:343:in 
> `block (3 levels) in <top (required)>'
> Tasks: TOP => gitlab:check => gitlab:gitlab_shell:check
> (See full trace by running task with --trace)
>
>
> Going into : /var/opt/gitlab/git-data  I see gitlab-satellites, 
> repositories and repositories.old.1422393536
> Inside repositories/username/project.git/ I see a packed-refs file 
> containing:
> # pack-refs with: peeled fully-peeled 
> 932d91afd78f6126a10552f07842a9357c48fef2 refs/heads/master
>
> There is also a hooks.old.1422393536 directory with a bunch of stuff 
> inside.
>
> The config file contains:
> [core]
> repositoryformatversion = 0
> filemode = true
> bare = true
> [remote "origin"]
> url = /var/opt/gitlab/backups/repositories/root/scheduler.bundle
>
> Going into refs/heads/ I see a master file which contains:
> 747f89f16ac88f241494a931cce4a1b477589430
> This is the same hash as the object not found error in the above 
> gitlab-shell:check run.
>
> From what I can tell this git repository ended up in some kind of 
> inconsistent state, but I can try other things if suggested.  I previously 
> spent a lot of time looking into the Gitlab API inaccessible error, but 
> those were generally config and ssh key problems, I don't believe the 
> config or keys are the cause since the other projects work fine.  This is 
> is far as I could narrow it down, any suggestions greatly appreciated.
>
> Regards,
> -DC
>

-- 
You received this message because you are subscribed to the Google Groups 
"GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to gitlabhq+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/gitlabhq/fd5ce3f0-5534-4236-8981-3149ccc3217b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to