Trouble ogging in and cloning repositories to self-hosted Onedev instance behind Traefik

I'm having trouble logging in with Docker from the terminal nor cloning repositories from my self-hosted onedev instance that is deployed behind a Traefik reverse proxy.

The onedev server is running in a Docker container with the following Docker Compose configuration:

services:
  app:
    hostname: 'onedev'
    image: '1dev/server:latest'
    container_name: 'onedev-app'
    restart: unless-stopped
    environment:
      - hibernate_dialect=io.onedev.server.persistence.PostgreSQLDialect
      - hibernate_connection_driver_class=org.postgresql.Driver
      - hibernate_connection_url=jdbc:postgresql://onedev-db:5432/onedev
      - hibernate_connection_username=onedev-user
      - hibernate_connection_password=changeMe.aHighlyComplexPasswordToKeepYouSecure
      - initial_user=LocalUser
      - initial_password=Password
      - initial_email=username@local.com
      - initial_server_url=https://onedev.domain.local
      - initial_ssh_root_url=ssh://onedev.domain.local
    volumes:
      - 'onedev-app-data-vol:/opt/onedev'
      - '/var/run/docker.sock:/var/run/docker.sock'
    networks:
      - 'onedev-network'
    ports:
      - '6610:6610'
    depends_on:
      db:
        condition: service_healthy
  db:
    hostname: 'postgresql'
    image: 'postgres:16-alpine'
    container_name: 'onedev-db'
The host is secured with TLS 1.3 and accessible via a web GUI. over https://onedev.domain.local
However using unsecured http + IP + port works fine when it comes to regular git operation

Could you please help me troubleshoot this issue?

**docker login onedev.domain.local   ->> throws 401 Unauthorized
git clone ->> throws again remote 401 Unauthorized**

Any help would be greatly appreciated!

If you have an issue with Traefik, you should share your static and dynamic config, and docker-compose.yml if used.

Enable and check Traefik debug log and Traefik access log in JSON format.

I identified that the custom Traefik error-catcher middleware was the source of the problem. When first request hit the self-hosted GIT instance and there are no creds provided yet it responds with 401 and this is a moment whern middleware took over. Thx for your time anyways!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.