Gitea and DroneCI authentication no longer works #7763

Closed
opened 2025-11-02 07:35:56 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @1mfaasj on GitHub (Aug 27, 2021).

  • Gitea version: 1.15.0
  • Git version: n/a
  • Operating system: Docker-compose / Docker engine / on my QNAP
  • Database (use [x]): the build-in database.
  • Can you reproduce the bug at https://try.gitea.io: No because Iam using DroneCI for this.
    Logs
GET /login/oauth/authorize?client_id=0bdb52e4-8db7-4904-a582-ff4fb5fd79f1&redirect_uri=https%3A%2F%2Fdrone.mydomain.com%2Flogin&response_type=code&state=8866cb397916001e 302 Found in 423.563464ms
                                                                                                                                                                                                           2021/08/27 13:56:30 Started POST /login/oauth/access_token for 10.0.0.2:0
                                           2021/08/27 13:56:30 Completed POST /login/oauth/access_token 400 Bad Request

Description
Hi
I have been using droneCI in combination with Gitea for a while now and since the last release of Gitea (1.15.0) the authentication no longer works. So when I try to login to Drone, a request goes to Gitea but every time I get the message:
invalid_client: cannot load client with client id: 'f7d5bc50-0039-4dad-bc30-4e4aa5b9f616'
'
the funny thing is, that's the OLD client id, I've already generated a new one a few times and included it in docker-compose, but it always comes up with the old id.

I haven't changed anything in the docker-compose except the clientid (the new generated) and the new Gitea version.

my docker-compose file:

version: "3"
services:
  gitea:
    image: gitea/gitea:1.15.0
    environment:
      - USER_UID=1000
      - USER_GID=100
    networks:
      - traefik_public
    volumes:
      - /share/docker/swarm/appdata/gitea/app:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - 3000:3000
      - 222:22

  drone:
    image: drone/drone:2.1.0
    environment:
      - DRONE_DEBUG=true
      - DRONE_ADMIN=gitea
      - DRONE_USER_CREATE=username:gitea,admin:true
      - DRONE_SERVER_PORT=:80
      - DRONE_DATABASE_DRIVER=sqlite3
      - DRONE_GIT_ALWAYS_AUTH=false
      - DRONE_GITEA_SERVER=https://gitea.mydomain.com
      - DRONE_RPC_SECRET=bea26a2221fd8090ea38720fc445eca6
      - DRONE_SERVER_HOST=drone.mydomain.com
      - DRONE_HOST=https://drone.mydomain.com
      - DRONE_SERVER_PROTO=https
      - DRONE_TLS_AUTOCERT=false
      - DRONE_AGENTS_ENABLED=true
      - DRONE_GITEA_CLIENT_ID=0bdb52e4-8db7-4904-a582-ff4fb5fd79f1
      - DRONE_GITEA_CLIENT_SECRET=IREMOVEDTHISPART
      - DRONE_NETWORK=traefik_public
      - DRONE_RUNNER_NETWORKS=traefik_public
      - DRONE_LOGS_DEBUG=true
      - DRONE_LOGS_TEXT=true
      - DRONE_LOGS_PRETTY=true
      - DRONE_LOGS_COLOR=true
    ports:
      - 3001:80
      - 3003:443
    networks:
      - traefik_public
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /share/docker/swarm/appdata/drone:/data

Originally created by @1mfaasj on GitHub (Aug 27, 2021). - Gitea version: 1.15.0 - Git version: n/a - Operating system: Docker-compose / Docker engine / on my QNAP - Database (use `[x]`): the build-in database. - Can you reproduce the bug at https://try.gitea.io: No because Iam using DroneCI for this. **Logs** ``` GET /login/oauth/authorize?client_id=0bdb52e4-8db7-4904-a582-ff4fb5fd79f1&redirect_uri=https%3A%2F%2Fdrone.mydomain.com%2Flogin&response_type=code&state=8866cb397916001e 302 Found in 423.563464ms 2021/08/27 13:56:30 Started POST /login/oauth/access_token for 10.0.0.2:0 2021/08/27 13:56:30 Completed POST /login/oauth/access_token 400 Bad Request ``` **Description** Hi I have been using droneCI in combination with Gitea for a while now and since the last release of Gitea (1.15.0) the authentication no longer works. So when I try to login to Drone, a request goes to Gitea but every time I get the message: `invalid_client: cannot load client with client id: 'f7d5bc50-0039-4dad-bc30-4e4aa5b9f616'` ' the funny thing is, that's the OLD client id, I've already generated a new one a few times and included it in docker-compose, but it always comes up with the old id. I haven't changed anything in the docker-compose except the clientid (the new generated) and the new Gitea version. **my docker-compose file:** ``` version: "3" services: gitea: image: gitea/gitea:1.15.0 environment: - USER_UID=1000 - USER_GID=100 networks: - traefik_public volumes: - /share/docker/swarm/appdata/gitea/app:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - 3000:3000 - 222:22 drone: image: drone/drone:2.1.0 environment: - DRONE_DEBUG=true - DRONE_ADMIN=gitea - DRONE_USER_CREATE=username:gitea,admin:true - DRONE_SERVER_PORT=:80 - DRONE_DATABASE_DRIVER=sqlite3 - DRONE_GIT_ALWAYS_AUTH=false - DRONE_GITEA_SERVER=https://gitea.mydomain.com - DRONE_RPC_SECRET=bea26a2221fd8090ea38720fc445eca6 - DRONE_SERVER_HOST=drone.mydomain.com - DRONE_HOST=https://drone.mydomain.com - DRONE_SERVER_PROTO=https - DRONE_TLS_AUTOCERT=false - DRONE_AGENTS_ENABLED=true - DRONE_GITEA_CLIENT_ID=0bdb52e4-8db7-4904-a582-ff4fb5fd79f1 - DRONE_GITEA_CLIENT_SECRET=IREMOVEDTHISPART - DRONE_NETWORK=traefik_public - DRONE_RUNNER_NETWORKS=traefik_public - DRONE_LOGS_DEBUG=true - DRONE_LOGS_TEXT=true - DRONE_LOGS_PRETTY=true - DRONE_LOGS_COLOR=true ports: - 3001:80 - 3003:443 networks: - traefik_public volumes: - /var/run/docker.sock:/var/run/docker.sock - /share/docker/swarm/appdata/drone:/data ```
Author
Owner
@KN4CK3R commented on GitHub (Aug 27, 2021): https://blog.gitea.io/2021/08/gitea-1.15.0-is-released/#-asymmetric-jwt-signing-key-16010httpsgithubcomgo-giteagiteapull16010
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7763