Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings->Repositories causing "500" error if the user (the user is an admin) has not created/owned any repository #14189

Closed
1 of 5 tasks
georgewayne opened this issue Dec 30, 2020 · 4 comments · Fixed by #14197
Labels
Milestone

Comments

@georgewayne
Copy link

  • Gitea version (or commit ref): 1.13.1 built with GNU Make 4.3, go1.15.6 : bindata, timetzdata, sqlite, sqlite_unlock_notify
  • Git version: 2.26.2
  • Operating system: Linux
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • [x
      Capture
      ] No
  • Log gist:

Description

logged in user is a site admin who has not created or own any repository. Would get "500" error (screen shot attached) when choose Settings->Repositories tab.

Screenshots

@zeripath
Copy link
Contributor

please give us logs,

@zeripath
Copy link
Contributor

seriously if you just gave us logs I would be able to sort this out without having to fire up a gitea instance.

@zeripath
Copy link
Contributor

2020/12/30 16:54:48 ...r/setting/profile.go:257:Repos() [E] filepath.Walk: lstat /data/git/repositories/administrator: no such file or directory

@zeripath
Copy link
Contributor

zeripath commented Dec 30, 2020

which comes from:

ctx.ServerError("filepath.Walk", err)

and actually from:

root := filepath.Join(models.UserPath(ctxUser.Name))
if err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error {

because the user directory doesn't exist.

We simply need to ensure it does.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants