Cannot authenticate with Gitea

I’m running both in Swarm (for now). I am deploying a stack with the following:

version: "3.4"
        image: drone/drone:latest
            - drone_data:/var/lib/drone
            - "8000:8000"
            - 9000
            - DRONE_OPEN=true
            - DRONE_HOST=<my-drone-url>
            - DRONE_GITEA=true
            - DRONE_GITEA_URL=https://<my-gitea-url>
            - DRONE_SECRET=notverysecret
            - drone
            - traefik-net

When I enter my Gitea username/password, the UI says “The system failed to process your Login request” and in the logs I see :

 level=error msg="cannot authenticate user. invalid character '<' looking for beginning of value"

This error message would indicate that the API call to authenticate with Gitea is not reaching the API endpoint, and is instead being presented with an html response. The < refers to the opening tag of html document.

This could indicate an issue with your reverse proxy (Traefik) or could indicate a configuration issue. Can you confirm the authentication request is reaching Gitea by checking the Gitea logs? What do you see?

One common root cause for this error is using the wrong protocol scheme when you configure your Gitea address. For example, if you provide Drone with the http address instead of the https address, the API call will return a 302 redirect with an HTML body, resulting in an error message similar to the one you’ve posted.

:slight_smile: That was it - I had changed over to using from and had forgotten to update that line in my docker-compose.yml

I’ll get my coat …