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

Can't login on windows #19

Closed
theminecoder opened this issue Mar 30, 2016 · 14 comments
Closed

Can't login on windows #19

theminecoder opened this issue Mar 30, 2016 · 14 comments

Comments

@theminecoder
Copy link

Just tried installing the client after the twitter post was announce and wanted to login, however the client isn't being so nice about it. 1.0 Releases eh?

Anyway when attempting to login, it seems that the client is ignoring all the argument flags and not actually running the auth flow (or at least clearly stating what it does)
image 2016-03-30 at 4 48 01 pm

Also it seems to spin up my browser to an attempted auth page but all that prints is unknown client.

Goob job on a 1.0 attempt though guys, looking forward it working nicer :P

@bryanl
Copy link
Contributor

bryanl commented Mar 30, 2016

I've been able to verify this, and I'm working out a fix for it right now.

@bryanl
Copy link
Contributor

bryanl commented Mar 31, 2016

I'm working on a solution for this, and in the mean time, you can create a file called .doctlcfg in your home directory (not sure what this is on all versions of Windows) with the following contents:

access-token: <your do access token>

You can manually retrieve an access token at https://cloud.digitalocean.com/settings/api/tokens

@narration-sd
Copy link

As well, doesn't work with the form of .doctlcfg in the Github Readme.md, unless you put the expected comma in between the arguments, to make it proper JSON.

{
    access-token: <yours>,  <---- the crucial comma...
    output: <json|text>
}

The location on Win10 and likely earlier is

c:\Users\yourusername_perhapsshortened\.doctlcfg

It does work just simply putting

access-token: <yours> 

alone in the file, as you suggest above, but better if the full form is used, and the json is actually better for human reading I think.

@bryanl
Copy link
Contributor

bryanl commented Apr 3, 2016

The format isn't JSON, it's yaml

@narration-sd
Copy link

Hi Bryan -- yes, thanks; it came to me late in the night that it hadn't been JSON, but sensibly still needed its comma. The state of coders doing documentation, and of course syntax is seldom the large problem....

Anyway, so many scriptings, so little time, also. We switch gears when we have our head into a page, and deal in the context, don't we.

Kind regards,
Clive

[redacted later for the various iPadisms which had crept in...who needs ai, when you've got something with such a mind of it's own...!]

On Apr 3, 2016, at 11:09 AM, Bryan Liles notifications@github.com wrote:

The format isn't JSON, it's yaml


You are receiving this because you commented.
Reply to this email directly or view it on GitHub

@darkmorpher
Copy link

Same as @theminecoder

doctl auth login opens up the browser but the page reads unknown client

ICAW: Type %homepath% in start menu or echo %homepath% in CMD

@Ahrotahntee
Copy link

Seeing a problem when attempting to authenticate on Windows as well. It looks like it's not reading the configuration file?

I confirmed the location of user.Current().HomeDir as C:\Users\Ahro, with the correct file name being .doctlcfg, but it doesn't seem to be reading the settings saved in the file. As per this thread I used YAML syntax, as well as trying it with just the single key option.

I attached a debugger and didn't see it even attempt to open the file before beginning network operations.

@bryanl
Copy link
Contributor

bryanl commented Apr 9, 2016

@darkmorpher Those options are missing for ssh. Would you mind opening a new issue?

@bryanl
Copy link
Contributor

bryanl commented Apr 9, 2016

@Ahrotahntee I'm trying to replicate your findings. I do have it working with Windows 10.

@klauern
Copy link

klauern commented Apr 21, 2016

I'm having trouble with this .doctlcfg file. I have it in my home, but it isnt' recognizing it. However, I can pass the command-line flag to all commands and that works successfully:

C:\Users\Me > doctl -t <token> compute droplet-action shutdown <id>
ID              Status          Type            Started At                      Completed At    Resource ID     Resource Type   Region
<id>            in-progress     shutdown        2016-04-21 23:23:26 +0000 UTC   <nil>           <id 2>          droplet         nyc3

@klauern
Copy link

klauern commented Apr 22, 2016

Ok, ignore my previous update. I mis-typed the cfg file. I had .dotctlcfg not .doctlcfg.

@Phrown420
Copy link

Unless I'm doing something wrong, I'm still getting this unknown client error, even with v1.1.0

@bryanl
Copy link
Contributor

bryanl commented May 6, 2016

@Phrown420 logging with the tool is a known issue on Windows. To proceed, generate an access token at https://cloud.digitalocean.com/settings/api/tokens. Then you have 3 options.

  1. Add an access-token entry to .doctlcfg (this will be the easiest)
  2. Use the access token argument when running doctl
  3. Set DIGITALOCEAN_ACCESS_TOKEN environment variable to your token.

@bryanl
Copy link
Contributor

bryanl commented Jun 8, 2016

As I'm thinking right now doctl auth login will go away in the next release. doctl will introduce something like doctl auth init, and that will require you to enter in your key.

@bryanl bryanl closed this as completed Jun 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants