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

"Require Signed Commits" option doesn't work #27897

Open
atomlab opened this issue Nov 3, 2023 · 0 comments
Open

"Require Signed Commits" option doesn't work #27897

atomlab opened this issue Nov 3, 2023 · 0 comments

Comments

@atomlab
Copy link

atomlab commented Nov 3, 2023

Description

Hello. I want to accept signed and verified commits only.

I have configured the repository:

  1. Settings -> Repository -> Signature Trust Model -> Commiter
  2. Settings -> Branches (main) -> Create New Rule -> "Require Signed Commits" enabled.

Expected behavior

All unsigned and unverified commits are rejected.

What's really happening

All unsigned and all unverified commits are successfully accepted.

Gitea Version

1.20.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

Screenshot 2023-11-03 at 18 41 29
Screenshot 2023-11-03 at 18 25 18
Screenshot 2023-11-03 at 18 39 31
Screenshot 2023-11-03 at 18 54 11

Git Version

2.40.1

Operating System

Linux

How are you running Gitea?

With docker

docker-compose.yml

version: "3"

services:
  db:
    container_name: db
    image: postgres:16
    network_mode: host
    environment:
      - POSTGRES_USER=gitea
      - POSTGRES_PASSWORD=gitea
      - POSTGRES_DB=giteadb
    volumes:
      - "/opt/gitea/config/postgresql.conf:/etc/postgresql/postgresql.conf"
      - "/opt/gitea/config/pg_hba.conf:/etc/postgresql/pg_hba.conf"
      - "/opt/gitea/data/db:/var/lib/postgresql/data"
    command: postgres -c hba_file=/etc/postgresql/pg_hba.conf -c config_file=/etc/postgresql/postgresql.conf

  server:
    container_name: gitea
    image: gitea/gitea:1.20.5
    network_mode: host
    environment:
      - USER_UID=1100
      - USER_GID=1100
      - SSH_LISTEN_PORT=2222 # sshd_config config
      - GITEA__mailer__ENABLED=false
      - GITEA__security__SECRET_KEY="<mysecret>"
      - GITEA__security__INTERNAL_TOKEN="<mytoken>"
      - GITEA__service__DISABLE_REGISTRATION=True
      - GITEA__server__SSH_PORT=22 # Port number to be exposed in clone URL
      - GITEA__server__SSH_LISTEN_PORT=2222 # The port number the builtin SSH server should listen on
      - GITEA__server__HTTP_PORT=3000
      - GITEA__server__ROOT_URL="http://<mydomain>"
      - GITEA__server__DOMAIN="<mydomain>"
      - GITEA__server__SSH_DOMAIN=<mydomain>
      - GITEA__server__LFS_JWT_SECRET="<mysecret>"
      - GITEA__database__DB_TYPE=postgres
      - GITEA__database__HOST=127.0.0.1:5432
      - GITEA__database__NAME=giteadb
      - GITEA__database__USER=gitea
      - GITEA__database__PASSWD=gitea
      - GITEA__repository__ROOT=/data/git/gitea-repositories
      - GITEA__repository.signing__DEFAULT_TRUST_MODEL= committer
      - GITEA__repository.signing__SIGNING_KEY=default
      - GITEA__webhook__ALLOWED_HOST_LIST=private,loopback
      - GITEA__lfs__PATH=/data/git/lfs
    volumes:
      - "/opt/gitea/data/gitea:/data"
      - /home/git/.ssh/:/data/git/.ssh
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    depends_on:
      - db

Database

PostgreSQL

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

No branches or pull requests

2 participants