Gitea: Can't push on normal user's repo with admin account

Created on 21 Jun 2018  路  6Comments  路  Source: go-gitea/gitea

  • Gitea version (or commit ref): 1.4.2
  • Git version: 2.7.4
  • Operating system: Ubuntu
  • Database (use [x]):

    • [ ] PostgreSQL

    • [x] MySQL

    • [ ] MSSQL

    • [ ] SQLite

  • Can you reproduce the bug at https://try.gitea.io:

    • [ ] Yes (provide example URL)

    • [ ] No

    • [x] Not relevant

  • Log gist:
2018/06/21 12:53:45 [...routers/repo/http.go:205 HTTP()] [E] User permission denied

Description

When I want to push some files with my admin account on a repo created by a normal user using https git gives me error 403 (Forbidden). I tried both password and token API but the outcome was always the same. The strange fact is that in the Web Interface admins can act freely on any repo.

kinproposal

Most helpful comment

Maybe we could add a config to enable admin user could clone and push to any repository.

All 6 comments

Problem can be there
https://github.com/go-gitea/gitea/blob/ec0ae5d50c59315a3c597b1cf24d4c5508c718e5/models/access.go#L62
There's nothing that handles admins account

You could add yourself as that repo's collaboration.

That is currently expected behaviour to not allow admins clone/push to repositories only if explicitly allowed just as other users

If I need to do something automated adding always myself to every repo's collaboration group is really frustrating. Anyway that doesn't make any sense because in web interface admins can do whatever they want in any repo while in git they are limited to act only in their own repos.

I am facing the same problem and would be interested to know how to make that work

Maybe we could add a config to enable admin user could clone and push to any repository.

Was this page helpful?
0 / 5 - 0 ratings