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
  • #4474

Closed
Open
Created Jul 01, 2013 by Administrator@rootOwner

Edit file results in 500

Created by: Karamorf

Summary

When clicking the 'edit' button on the view file page, I get a 500 error.

Steps to reproduce

Go to a repository with content click on one of the files click on the edit button

Expected behavior

The UI to allow me to edit the file is displayed

Observed Behavior

receive 500 http error

Relevant logs and/or screen shots

Processing by EditTreeController#show as HTML
  Parameters: {"project_id"=>"curtis.x.macduff.-nd/test", "id"=>"master/bashrc"}
Completed 500 Internal Server Error in 64ms

NoMethodError (undefined method `sha' for nil:NilClass):
  app/controllers/edit_tree_controller.rb:13:in `show'

output checks

application check

Checking Environment ...

Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes

Checking Environment ... Finished

Checking GitLab Shell ...

GitLab Shell version >= 1.4.0 ? ... OK (1.4.0)
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
post-receive hook up-to-date? ... yes
post-receive hooks in repos are links: ... 
Curtis MacDuff / test ... ok
Curtis MacDuff / t ... repository is empty
Administrator / test.wiki ... repository is empty
Administrator / t.wiki ... repository is empty
Curtis MacDuff / te ... repository is empty
Curtis MacDuff / ack ... repository is empty
Curtis MacDuff / re ... repository is empty
Curtis MacDuff / dfsdfsd ... repository is empty
Curtis MacDuff / sdfsd ... repository is empty
Curtis MacDuff / sdfadf ... repository is empty
Curtis MacDuff / dafgvcvb ... repository is empty

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes

Checking Sidekiq ... Finished

Checking GitLab ...

Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... no
  Try fixing it:
  Redownload the init script
  For more information see:
  doc/install/installation.md in section "Install Init Script"
  Please fix the error above and rerun the checks.
Projects have satellites? ... 
Curtis MacDuff / test ... yes
Curtis MacDuff / t ... can't create, repository is empty
Administrator / test.wiki ... can't create, repository is empty
Administrator / t.wiki ... can't create, repository is empty
Curtis MacDuff / te ... can't create, repository is empty
Curtis MacDuff / ack ... can't create, repository is empty
Curtis MacDuff / re ... can't create, repository is empty
Curtis MacDuff / dfsdfsd ... can't create, repository is empty
Curtis MacDuff / sdfsd ... can't create, repository is empty
Curtis MacDuff / sdfadf ... can't create, repository is empty
Curtis MacDuff / dafgvcvb ... can't create, repository is empty
Redis version >= 2.0.0? ... yes
Your git bin path is "/home/git/git/bin/git"
Git version >= 1.7.10 ? ... yes (1.8.3)

Checking GitLab ... Finished

The init.d script behaves funkily on CentOS. I've rewritten it. I'll see about contributing back the changes.

version 5-3-stable

sha: e1c473c1

System information
System:         Red Hat Enterprise Linux Server release 6.3 (Santiago)
Current User:   git
Using RVM:      no
Ruby Version:   1.9.3p429
Gem Version:    1.8.23
Bundler Version:1.3.5
Rake Version:   10.0.4

GitLab information
Version:        5.3.0
Revision:       e1c473c
Directory:      /home/git/gitlab
DB Adapter:     mysql2
URL:            http://10.42.15.116
HTTP Clone URL: http://10.42.15.116/some-project.git
SSH Clone URL:  [email protected]:some-project.git
Using LDAP:     yes
Using Omniauth: no

GitLab Shell
Version:        1.4.0
Repositories:   /home/git/repositories
Hooks:          /home/git/gitlab-shell/hooks/
Git:            /home/git/git/bin/git

Possible fixes

I removed the .sha method call from this line: https://github.com/gitlabhq/gitlabhq/blob/master/app/controllers/edit_tree_controller.rb#L13

Probably not the best of solutions, but the page doesn't return a 500 now.

Assignee
Assign to
Time tracking