cli icon indicating copy to clipboard operation
cli copied to clipboard

hcloud: unable to authenticate (unauthorized) with correct token

Open papanito opened this issue 3 years ago • 0 comments

I have two contexts

  • production
  • development

I have a token for each context - they are correct and of 64bit length

  • development = YSSH...
  • production = K3vt...

image

Non-working context

  1. I set HCLOUD to YSSH...

  2. I am in the correct contect

    $ hcloud context list
    ACTIVE   NAME
    *        development
             production
    
  3. Run hcloud server list

    $hcloud server list
    hcloud: unable to authenticate (unauthorized)
    

--> I would expect this to work

I even tried creating a new token, same result

Working context

  1. I set HCLOUD to K3vt...

  2. I switch the contect

    $ hcloud context list
    ACTIVE   NAME
             development
    *        production
    
  3. Run hcloud server list

    $hcloud server list
    ID        NAME    STATUS    IPV4             IPV6                     PRIVATE NET   DATACENTER
    xxxxxx    ttrss   running   xx.xxx.xxx.xxx   xxxx:xxx:xxxx:xxx::/64   -             hel1-dc2
    

--> works as expected

Version

$ hcloud version
hcloud 1.30.3

papanito avatar Sep 01 '22 11:09 papanito