Coder Social home page Coder Social logo

Can't login on windows about doctl HOT 14 CLOSED

digitalocean avatar digitalocean commented on September 28, 2024 1
Can't login on windows

from doctl.

Comments (14)

bryanl avatar bryanl commented on September 28, 2024

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

from doctl.

bryanl avatar bryanl commented on September 28, 2024

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

from doctl.

narration-sd avatar narration-sd commented on September 28, 2024

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.

from doctl.

bryanl avatar bryanl commented on September 28, 2024

The format isn't JSON, it's yaml

from doctl.

narration-sd avatar narration-sd commented on September 28, 2024

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 [email protected] 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

from doctl.

darkmorpher avatar darkmorpher commented on September 28, 2024

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

from doctl.

Ahrotahntee avatar Ahrotahntee commented on September 28, 2024

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.

from doctl.

bryanl avatar bryanl commented on September 28, 2024

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

from doctl.

bryanl avatar bryanl commented on September 28, 2024

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

from doctl.

klauern avatar klauern commented on September 28, 2024

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

from doctl.

klauern avatar klauern commented on September 28, 2024

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

from doctl.

Phrown420 avatar Phrown420 commented on September 28, 2024

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

from doctl.

bryanl avatar bryanl commented on September 28, 2024

@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.

from doctl.

bryanl avatar bryanl commented on September 28, 2024

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.

from doctl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.