Skip to content

Error 404 and 403 on big update #4163

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

Closed
2 of 7 tasks
Chouchen opened this issue Jun 6, 2018 · 7 comments
Closed
2 of 7 tasks

Error 404 and 403 on big update #4163

Chouchen opened this issue Jun 6, 2018 · 7 comments
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.

Comments

@Chouchen
Copy link
Contributor

Chouchen commented Jun 6, 2018

  • Gitea version (or commit ref): Gitea version 1.4.2 built with: bindata, sqlite (from binaries)
  • Operating system: debian 9.4
  • Git version: git version 2.11.0
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

2 kinds of error:

[...routers/repo/view.go:295 Home()] [E] Home: Cannot find any unit on this repository which you are allowed to access
[...ules/context/repo.go:691 func1()] [E] CheckUnit: You are not allowed to visit this repository unit: 1

Description

I migrated from Gogs a time ago with Gitea version 1.1.2 built with: bindata, sqlite and switched back to gogs afterwards for a moment.

Now, I want to fully migrate to Gitea, so, I reactivated this gitea which works well.

Then, I tried to upgrade to Gitea version 1.4.2 built with: bindata, sqlite by replacing the old binaries with the new one. Everything seems to work well for new repo but all the old ones gives 404 or 403.

My guess is this comes from the database ; as if some migrations were not done. Do I need to upgrade from version to version (like 1.1.2 -> 1.1.3 -> 1.1.4 -> 1.2.0 -> etc)?

Screenshots

firefox_2018-06-06_22-17-27

@lafriks
Copy link
Member

lafriks commented Jun 8, 2018

Yes, when upgrading from gogs upgrade path should be gogs -> 1.0.2 -> 1.1.4 -> 1.2.3 -> 1.3.4 -> 1.4.2

This error can be related to: #1794 (comment)

@lafriks lafriks added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Jun 8, 2018
@Chouchen
Copy link
Contributor Author

Chouchen commented Jun 8, 2018

I guess I did gogs → 1.0.2 → 1.1.2 back then. So I'll try migrating from 1.1.2 → 1.1.4 → 1.2.3 → 1.3.4 → 1.4.2.

Is there any documentation about those steps? I didn't see it anywhere.

I tried the SQL query from that comment and the ones above id and it didn't work (mysql error for missing fields or syntax).

@Chouchen
Copy link
Contributor Author

Chouchen commented Jun 8, 2018

Alright, first of all, it must be 1.3.3 instead of 1.3.4 (which doesn't exist).

But anyway, from 1.1.4 (which works) to 1.2.3, I got the same error. My test repository goes 404 :(

@Chouchen
Copy link
Contributor Author

Chouchen commented Jun 8, 2018

OK, running #1794 (comment) made it works on 1.2.3. Continuing the migration process…

@Chouchen
Copy link
Contributor Author

Chouchen commented Jun 8, 2018

Alright, other migrations went well afterwards. I have to repo with error 500 which is not associated with this ticket.

My question here is still relevant. It would have save me a lot of time…

@lafriks
Copy link
Member

lafriks commented Jun 8, 2018

No there is not but it would be great if you could update gogs -> gitea migration manual in docs and submit PR, any help with docs are really appreciated.

@Chouchen
Copy link
Contributor Author

The documentation has been added.

@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
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.
Projects
None yet
Development

No branches or pull requests

2 participants