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

Error 500 after migrating github repository via api #8607

Closed
2 of 7 tasks
freebackup opened this issue Oct 21, 2019 · 8 comments · Fixed by #8631
Closed
2 of 7 tasks

Error 500 after migrating github repository via api #8607

freebackup opened this issue Oct 21, 2019 · 8 comments · Fixed by #8631
Assignees
Labels
Milestone

Comments

@freebackup
Copy link

  • Gitea version (or commit ref):
    1.11.0+dev-56-g28f60bb5c built with GNU Make 4.2.1, go1.13.3 : bindata, sqlite, sqlite_unlock_notify
  • Git version: N/A
  • Operating system: docker on ubuntu
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I am attempting to migrate github repositories to gitea. Each migration appears to work, but the repository is inaccessible in the GUI (display an Error 500 page).

$data='{
  "auth_username": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "clone_addr": "https://github.com/user/repository",
  "private": true,
  "mirror": true,
  "uid": 3,
  "repo_name": "repository",
  "auth_password": "",
  "description": ""
}'

$ curl -kvs -H 'Content-Type: application/json' -XPOST -d "$data" -H 'Authorization: token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 'http://gitea:3000/api/v1/repos/migrate

{
  "id": 19,
  "owner": {
    "id": 3,
    "login": "myuser",
    "full_name": "",
    "email": "",
    "avatar_url": "https://gitea.local/user/avatar/myuser/-1",
    "language": "",
    "is_admin": false,
    "last_login": "1970-01-01T00:00:00Z",
    "created": "2019-05-28T01:59:28Z",
    "username": "myuser"
  },
  "name": "repository",
  "full_name": "myuser/repository",
  "description": "Common Place to put documentation about VISION",
  "empty": false,
  "private": true,
  "fork": false,
  "parent": null,
  "mirror": true,
  "size": 1063,
  "html_url": "https://gitea.local/myuser/repository",
  "ssh_url": "git@gitea.local:myuser/repository.git",
  "clone_url": "https://gitea.local/myuser/repository.git",
  "original_url": "",
  "website": "",
  "stars_count": 0,
  "forks_count": 0,
  "watchers_count": 1,
  "open_issues_count": 0,
  "default_branch": "master",
  "archived": false,
  "created_at": "2019-10-21T04:17:17Z",
  "updated_at": "2019-10-21T04:17:21Z",
  "permissions": {
    "admin": true,
    "push": true,
    "pull": true
  },
  "has_issues": true,
  "internal_tracker": {
    "enable_time_tracker": true,
    "allow_only_contributors_to_track_time": true,
    "enable_issue_dependencies": true
  },
  "has_wiki": true,
  "has_pull_requests": true,
  "ignore_whitespace_conflicts": false,
  "allow_merge_commits": true,
  "allow_rebase": true,
  "allow_rebase_explicit": true,
  "allow_squash_merge": true,
  "avatar_url": ""
}

At this point the repository exists, but returns Error 500 when you attempt to browse to it.

I discovered after a while that the following command;

sqlite gitea.db 'update repository set status=0'

would immediately unlock all the repositories, and I could browse and interact with them.

These are NOT large repositories, most between 1 and 25 megabytes.

Am I doing something wrong? Not waiting long enough? Or is something broken?

Thanks
Dave

Screenshots

@systemmonkey42
Copy link

systemmonkey42 commented Oct 21, 2019

I installed a fresh instance (docker gitea/gitea:latest), and the error still occurred.

I did another fresh install with an older image - Gitea Version: 1.8.3+2-g11f6ed4f8 (via docker image gitea/gitea:1.8) and the problem didn't occur, so I suspect its an issue with the latest release.

Cheers
Dave

EDIT: My apologies, I didn't realise I'd switched users.
EDIT2: I performed another test using 1.9.4 (from docker image gitea/gitea:1.9.4) and migrations worked as expected, so I'll stick to this version for now.

@afocus
Copy link

afocus commented Oct 22, 2019

me too

@lunny lunny added the type/bug label Oct 22, 2019
@lunny lunny added this to the 1.11.0 milestone Oct 22, 2019
@lunny lunny self-assigned this Oct 22, 2019
@max-wittig
Copy link
Contributor

Same here.

@max-wittig
Copy link
Contributor

Downgrading to 1.9.4 is working. I will play around with 1.10 again, when this issue is fixed.

@yukunyi
Copy link

yukunyi commented Nov 2, 2019

1.13.3 has same error.
the command is work: sqlite gitea.db 'update repository set status=0'

@davidlt
Copy link

davidlt commented Dec 31, 2019

The issue is still present int 1.10.1. IIUC this issue should be solved in 1.11.0 in 2020 Jan.

@lunny
Copy link
Member

lunny commented Dec 31, 2019

Maybe another of my PRs on v1.10.2 fixed this? #9511

@lunny
Copy link
Member

lunny commented Dec 31, 2019

@6543 Maybe @davidlt could confirm that.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
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.

7 participants