Compare commits

...

3 Commits

Author SHA1 Message Date
6543 f90341b994
Merge f53e02d8ee into 03518d3e18 2024-04-24 08:09:35 +09:00
Christoph Lange 03518d3e18
DOC: in ssh forwarding, user git must be allowed to run docker (#29634)
Added to doc for rootless Docker installation: for SSH passthrough, the
ssh user (git) has to be able to run docker.

---------

Co-authored-by: techknowlogick <matti@mdranta.net>
2024-04-23 14:08:58 -04:00
m.huber f53e02d8ee Add more indices to action table for speed improvements 2024-04-09 16:53:17 +02:00
2 changed files with 11 additions and 6 deletions

View File

@ -350,6 +350,8 @@ Match User git
AuthorizedKeysCommand /usr/bin/docker exec -i gitea /usr/local/bin/gitea keys -c /etc/gitea/app.ini -e git -u %u -t %t -k %k
```
For this to work, the user `git` has to be allowed to run the `docker` cli command. Please read through the [security considerations](https://docs.docker.com/engine/security/#docker-daemon-attack-surface) of providing non-root linux users access to the docker daemon.
(From 1.16.0 you will not need to set the `-c /etc/gitea/app.ini` option.)
All that is left to do is restart the SSH server:

View File

@ -142,17 +142,17 @@ type Action struct {
ID int64 `xorm:"pk autoincr"`
UserID int64 `xorm:"INDEX"` // Receiver user id.
OpType ActionType
ActUserID int64 // Action user id.
ActUser *user_model.User `xorm:"-"`
RepoID int64
ActUserID int64 // Action user id.
ActUser *user_model.User `xorm:"-"`
RepoID int64 `xorm:"INDEX"`
Repo *repo_model.Repository `xorm:"-"`
CommentID int64 `xorm:"INDEX"`
Comment *issues_model.Comment `xorm:"-"`
IsDeleted bool `xorm:"NOT NULL DEFAULT false"`
IsDeleted bool `xorm:"INDEX NOT NULL DEFAULT false"`
RefName string
IsPrivate bool `xorm:"NOT NULL DEFAULT false"`
Content string `xorm:"TEXT"`
CreatedUnix timeutil.TimeStamp `xorm:"created"`
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
}
func init() {
@ -167,10 +167,13 @@ func (a *Action) TableIndices() []*schemas.Index {
actUserIndex := schemas.NewIndex("au_r_c_u_d", schemas.IndexType)
actUserIndex.AddColumn("act_user_id", "repo_id", "created_unix", "user_id", "is_deleted")
actDashboardIndex := schemas.NewIndex("r_c_u_d", schemas.IndexType)
actDashboardIndex.AddColumn("repo_id", "created_unix", "user_id", "is_deleted")
cudIndex := schemas.NewIndex("c_u_d", schemas.IndexType)
cudIndex.AddColumn("created_unix", "user_id", "is_deleted")
indices := []*schemas.Index{actUserIndex, repoIndex, cudIndex}
indices := []*schemas.Index{actUserIndex, repoIndex, actDashboardIndex, cudIndex}
return indices
}