doctl
doctl copied to clipboard
Error when on VPN
Attempting to authenticate with API token using 'doctl auth init' was not possible when on my VPN (Service:Private Internet Access. Server:Melbourne, Aus) it prompts for entry of the token, but after that it just spews thousands of lines of junk. I saw cloudflare written somewhere amongst it all and after dropping the VPN, and authenticating with token, VPN can be used again.
Blasting a whole webpage, including images onto the stdout is not super helpful, could you maybe detect the use of CLI Client and change the behavior to a short, helpful message?
I have the same error problem. This is the error message:
Error: Get "https://api.digitalocean.com/v2/account": dial tcp: lookup api.digitalocean.com on [::1]:53: dial udp [::1]:53: connect: cannot assign requested address
Disabling VPN resolves the issue.
Are you able to access api.digitalocean.com
at all with your VPN enabled (e.g. using curl
)? Or does this only effect doctl
?
Yes, it only affects doctl
.
$ curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $DO_TOKEN" "https://api.digitalocean.com/v2/account"
{"account":{"droplet_limit":10,"floating_ip_limit":3,"volume_limit":10,"email":"<my email>","uuid":"<my uuid>","email_verified":true,"status":"active","status_message":""}}
$ doctl account get
Error: Get "https://api.digitalocean.com/v2/account": dial tcp: lookup api.digitalocean.com on [::1]:53: dial udp [::1]:53: connect: cannot assign requested address
@FreeTheSmoke & @bkiac can you share which OS you're using?
My OS is Pop!_OS 20.04 LTS
and my VPN is ExpressVPN 3.0.2.12
.
This may be related to https://github.com/golang/go/issues/25321.