Gitea cannot authenticate user

I,m using gitea on my server with https, and trying to run drone on local.

here is my docker-compose file:

version: "2"
services:
  drone-server:
    image: drone/drone:0.8
    ports:
     - 80:8000
     - 9000
    volumes:
      - ./drone:/var/lib/drone/
    restart: always
    environment:
      - DRONE_HOST=http://localhost
      - DRONE_GITEA=true
      - DRONE_GITEA_URL=https://git.domain.ir
      - DRONE_OPEN=false
      - DRONE_GITEA_PRIVATE_MODE=true
      - DRONE_GITEA_SKIP_VERIFY=false
      - DRONE_SECRET=secret
  drone-agent:
    image: drone/agent:0.8
    command: agent
    restart: always
    depends_on: [ drone-server ]
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - DRONE_SERVER=drone-server:9000
      - DRONE_SECRET=secret

the drone-server stars without any error. the http://localhost shows a form requiring my version control system username and password. when I enter my gitea user & pass, it gives The system failed to process your Login request. error.

drone’s log:
level=error msg="cannot authenticate user. Post https://git.domain.ir/api/v1/users/rezam90/tokens: tls: oversized record received with length 20291"

if I change gitea domain to HTTP logs shows the following error:
level=error msg="cannot authenticate user. 403 Forbidden"

i’ve trying with different users, but same error.

But It works when I send the create token request manually with the body {"name": "drone"}. returns the token.

i tried with github too. it gives the tls error or timeout error. :frowning:

I solved the problem. it was my fault actually.
I’m using docker behind proxy. because docker has banned Iran.
that way all requests were passing through proxy.
after removing docker proxy and using os VPN the problem solved.

but don’t know how to do it without proxy!
thanks anyway

fixed. I think it was something related to my local docker. cause after using my prod server. that didn’t happen. thanks