How to login on divshot cli inside a vagrant box?

68 views Asked by At

Divshot has a nice command line interface. The first thing you should do after installing it with npm is to login.

divshot login

It should open a browser tab/window, you login on the divshot website and you authorise the CLI client by pressing a button at the end of the process.

But I have all my development environment on a vagrant box. When I type "divshot login" nothing happens. No browser tab appears.

What should I do?

2

There are 2 answers

1
Kevin On BEST ANSWER
  1. Run "divshot login" from your command line on you local machine and follow the instructions to login.
  2. Run "divshot auth:token" to get your auth token from the command line.
  3. When running commands that interact with the Divshot API, use the flag "--token " to give it authorization (on the vagrant box)
0
Colonel Panic On

Another solution:

  1. Run divshot login on your local computer
  2. Inspect $HOME/.divshot/config/user.json, check it has a key token
  3. Copy that file to the corresponding path on the other computer