Vagrant 1.8.1
Windows 10 x64
Hi. I'm trying to have some fun with vagrant share command. I tried to login to my atlas account like this:
位 vagrant login
In a moment we will ask for your username and password to HashiCorp's
Atlas. After authenticating, we will store an access token locally on
disk. Your login details will be transmitted over a secure connection, and
are never stored on disk locally.
If you do not have an Atlas account, sign up at
https://atlas.hashicorp.com.
Atlas Username: username
Password (will be hidden):
You are now logged in.
And then:
位 vagrant login --check
You are not currently logged in. Please run `vagrant login` and provide
your login information to authenticate.
Any ideas?
Hi @bkibilko
Thank you for opening an issue. I'm surprise this is not working as we have extensive unit and integration tests around this functionality. Can you please gist the debug logs when you login and during the check command?
What is the output of:
ls ~/.vagrant.d
ls ~/.vagrant.d/data
Hi @sethvargo ,
Thanks for quick response :).
https://gist.github.com/bkibilko/8cb000d7cea60e73b053a07471edbc7a
https://gist.github.com/bkibilko/3ef9b2193e9263f3af94d575a749419d
C:\Users\bkibilko\.vagrant.d
位 ls
boxes/ data/ gems/ insecure_private_key rgloader/ setup_version tmp/
C:\Users\bkibilko\.vagrant.d\data
位 ls
checkpoint_cache lock.dotlock.lock machine-index/
checkpoint_signature lock.machine-action-7443bb429fca91cdfeb2ca1b51785691.lock vagrant_login_token
fp-leases/ lock.machine-action-9d4852c3760bbcb47959a441907e77a5.lock```
Found it :smile:
Looks like you have an ATLAS_TOKEN environment variable set: https://gist.github.com/bkibilko/3ef9b2193e9263f3af94d575a749419d#file-vagrant-login-check-debug-L281, which is taking precedence over the locally stored token (which is what vagrant login does)
I deleted ATLAS_TOKEN environment variable and it works! Thanks for help :+1:
Hey @bkibilko
I'm glad we got it sorted out, however, I think this is still a UX bug. Vagrant should WARN if a vagrant_login_token is present and ATLAS_TOKEN is present, saying the envvar is going to take precedence. This would have saved you a bunch of time in debugging, so I'm going to re-open this as a UX issue.