exercism / cli

A Go based command line tool for exercism.org.
https://exercism.org/docs/using/solving-exercises/working-locally
MIT License
1.33k stars 359 forks source link

exercism configure not saving configuration #928

Open brianterrel opened 4 years ago

brianterrel commented 4 years ago

Hello,

I'm trying to get my token set up so I can download exercises. When I run the command to configure my token I get the response:

You have configured the Exercism command-line client:

Config dir: /home/brian/.config/exercism Token: (-t, --token) 7b1e2471-c246-4aee-a288-53ff07ac9fbe Workspace: (-w, --workspace) /home/brian/exercism API Base URL: (-a, --api) https://api.exercism.io/v1

However when I attempt to use exercism I get the prompt to configure again. Checking exercism troubleshoot I find:

Troubleshooting Information

Version

Current: 3.0.13 Latest: 3.0.13

Operating System

OS: linux Architecture: amd64

Configuration

Home: /home/brian/snap/exercism/5 Workspace: /home/brian/snap/exercism/5/exercism (default) Config: /home/brian/snap/exercism/5/.config/exercism API key: Find your API key at https://exercism.io/my/settings

API Reachability

GitHub:

Exercism:

It seems that I still only have the default configuration in place. I've rebooted a few times to make sure I don't have some strange state from installing. Is there some configuration file I can just manually edit?

Cheers

kotp commented 4 years ago

As noted in the Configuration section there is a config file. It is should reference the same token file.

However when I attempt to use exercism I get the prompt to configure again.

How do you attempt to use exercism? Can you show the command?

The other information that may be helpful is by what is given with exercism debug


You will want to reset the token, that should be treated like a password, and so should not be pasted in an issue or shared.

brianterrel commented 4 years ago

Attempted use:

brian@Sente:~/Programming/Clojure/exercism$ exercism download --exercise=hello-world --track=clojure Error:

Welcome to Exercism!

To get started, you need to configure the tool with your API token.
Find your token at

    https://exercism.io/my/settings

Then run the configure command:

    /snap/exercism/5/exercism configure --token=YOUR_TOKEN

Debug seems to be the same as troubleshoot?

brian@Sente:~/Programming/Clojure/exercism$ exercism debug

Troubleshooting Information

Version

Current: 3.0.13 Latest: 3.0.13

Operating System

OS: linux Architecture: amd64

Configuration

Home: /home/brian/snap/exercism/5 Workspace: /home/brian/snap/exercism/5/exercism (default) Config: /home/brian/snap/exercism/5/.config/exercism API key: Find your API key at https://exercism.io/my/settings

API Reachability

GitHub:

Exercism:

If you are having trouble please file a GitHub issue at https://github.com/exercism/exercism.io/issues and include this information.

brianterrel commented 4 years ago

Here are the contents of my user.json found in ~/.config/exercism

{ "apibaseurl": "https://api.exercism.io/v1", "token": "7b1e2471-c246-4aee-a288-53ff07ac9fbe", "workspace": "/home/brian/exercism" }

I tried copying this over to ~/snap/exercism/5/.config as discussed in this issue:

https://github.com/exercism/exercism/issues/5111

but it had no effect as far as I can tell. This is the only config file I've found in either location.

kotp commented 4 years ago

I sent an e-mail to you, hopefully it helps.

cc/ @exercism/cli

kotp commented 4 years ago

Here are the contents of my user.json found in ~/.config/exercism

{ "apibaseurl": "https://api.exercism.io/v1", "token": "7b1e2471-c246-4aee-a288-53ff07ac9fbe", "workspace": "/home/brian/exercism" }

I tried copying this over to ~/snap/exercism/5/.config as discussed in this issue:

exercism/exercism#5111

but it had no effect as far as I can tell. This is the only config file I've found in either location.

That is kind of the indication I was gleaning from the configuration. I sent some hints, hopefully that will work for you.