Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Token not working on 1.6.0 #1790

Closed
Phil57 opened this issue Oct 5, 2023 · 4 comments
Closed

API Token not working on 1.6.0 #1790

Phil57 opened this issue Oct 5, 2023 · 4 comments

Comments

@Phil57
Copy link

Phil57 commented Oct 5, 2023

Describe the bug

WATCHTOWER_HTTP_API_TOKEN seems not working on 1.6.0. API calls returns 401 errors. Metrics are not working either.

Steps to reproduce

Define WATCHTOWER_HTTP_API_TOKEN in the docker compose
Use the API with the defined token
Returns 401

Expected behavior

Respond to API call

Screenshots

No response

Environment

Docker
Portainer

Your logs

401 Unauthorized

Additional context

Same docker compose is working with 1.5.3.

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏

@Crakleurs
Copy link

Crakleurs commented Oct 8, 2023

Hello, I tried to reproduce the bug with the following docker-compose:

services:
  watchtower:
    image: containrrr/watchtower:1.6.0
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: --debug --http-api-update
    environment:
      - WATCHTOWER_HTTP_API_TOKEN=mytoken
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    ports:
      - 8080:8080 

Unfortunately I was unable to reproduce the bug. My server is running Debian GNU/Linux 11 (bullseye) and x86_64.

I usde this command to test curl -H "Authorization: Bearer mytoken" localhost:8080/v1/update

@Phil57
Copy link
Author

Phil57 commented Oct 9, 2023

Hello
Well I got it working again. I changed the token and it works. Looks like it started not want my previous token 😅

Thanks

@Phil57 Phil57 closed this as completed Oct 9, 2023
@gilmrt
Copy link

gilmrt commented Jan 6, 2024

I had the same issue and and modifying the token seems to solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants