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

Vultr API login failure #1

Open
paulie-g opened this issue May 22, 2022 · 5 comments
Open

Vultr API login failure #1

paulie-g opened this issue May 22, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@paulie-g
Copy link

Following the instructions exactly, refreshing the data yields this error (and no data obviously):

gave up after 4 attempts, last error : Get "https://api.vultr.com/v2/instances": oauth2: token expired and refresh token is not set
@mrusme
Copy link
Owner

mrusme commented May 22, 2022

Please make sure the API key you're using is still valid:

echo $VULTR_API_KEY
# check the key and if in doubt replace it with a new one
planor -p VULTR_API_KEY -c vultr

Just tested it myself and it works without any issue if the API key is valid.

@mrusme mrusme closed this as completed May 22, 2022
@mrusme mrusme added the invalid This doesn't seem right label May 22, 2022
@mrusme mrusme self-assigned this May 22, 2022
@paulie-g
Copy link
Author

Yes, the key is valid. For me, it works with curl:

curl "https://api.vultr.com/v2/instances"   -X GET   -H "Authorization: Bearer ${VULTR_API_KEY}"

.. does not work with planor, as described. Fresh build today from master. I was just trying planor out along with some of your other projects after coming across superhighway84. If it's enough for you that it works for you, that's perfectly fine. It really doesn't matter.

@mrusme
Copy link
Owner

mrusme commented May 22, 2022

@paulie-g could you generate a new token on the Vultr web UI and try it with that one? Also, could you please paste the exact command how you run planor?

@paulie-g
Copy link
Author

I kept regenerating the API keys. To run planor, I copy-pasted from your response above just to be sure. I even tried hard-coding vultr and the api key into planor.go. I didn't have time to figure out where to insert logging to see the request actually being sent. If there's an easy way to instrument something like that in Go, let me know and I'll try it. Otherwise we can assume it's some weird heisenbug, possibly machine-specific, that's not worth tracking down.

As an aside, passing in '-c Vultr' rather than '-c vultr' results in a segfault.

@paulie-g
Copy link
Author

Tried starting planor with HTTP_PROXY and HTTPS_PROXY, but it must use something other than go's http package and doesn't appear to respect them.

@mrusme mrusme reopened this May 23, 2022
@mrusme mrusme added bug Something isn't working and removed invalid This doesn't seem right labels May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants