go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
45.36k stars 5.51k forks source link

Updating broke user database #22317

Closed CodeDoctorDE closed 1 year ago

CodeDoctorDE commented 1 year ago

Description

After updating to the latest dev version, I can't login anymore. I tried restarting and using docker-compose down, but it didn't worked. I looked in the postgres database and found my user: 1 | codedoctor | CodeDoctor | | ....

This is the log that is printed after that: gitea | 2023/01/02 18:27:23 ...ers/web/auth/auth.go:206:SignInPost() [I] [13f3157f] Failed authentication attempt for CodeDoctor from 123.45.678.90:0: user does not exist [uid: 1, name: CodeDoctor, keyid: 0].

Gitea Version

Latest dev version

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/CodeDoctorDE/a136abc06837e13e7470f69ef497285b

Screenshots

No response

Git Version

The one from the docker image

Operating System

Raspbian

How are you running Gitea?

Using docker-compose:

version: "3"

networks:
  gitea:
    external: false
services:
  server:
    image: gitea/gitea:dev
    container_name: gitea
    #platform: linux/arm64
#    extra_hosts:
 #     - "host.docker.internal:host-gateway"
    environment:
# CENSORED
    restart: always
    networks:
      - gitea
    volumes:
      - ./gitea:/data
      - ./config:/etc/gitea
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "3004:3000"
      - "222:22"
    depends_on:
    - db
  db:
    image: postgres:14
    restart: always
    environment:
# CENSORED
    networks:
      - gitea
    volumes:
      - ./postgres:/var/lib/postgresql/data
  ci:
    image: woodpeckerci/woodpecker-server:latest
    restart: always
    ports:
      - 3009:8000
    volumes:
      - woodpecker-server-data:/var/lib/woodpecker/
    environment:
# CENSORED
  runner:
    image: woodpeckerci/woodpecker-agent:latest
    command: agent
    restart: always
    depends_on:
      - ci
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
# CENSORED

#  registry:
#    image: registry:2
#    restart: always
#    ports:
#      - 5000:5000
#    volumes:
#      - ./registry:/var/lib/registry
#      - ./certs:/certs
#      - ./auth:/auth
#    environment:
#      REGISTRY_HTTP_TLS_CERTIFICATE: /certs/linwood.dev.crt
#      REGISTRY_HTTP_TLS_KEY: /certs/linwood.dev.key
#      REGISTRY_AUTH: htpasswd
#      REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
#      REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm

volumes:
  woodpecker-server-data:

Database

PostgreSQL

CodeDoctorDE commented 1 year ago

Never mind, it was my fault..