Open yudi-azvd opened 1 year ago
Possibly related to #180?
Yes it is related. I was searching the issues but I couldnt find. Thats why I opened this issue
I tried the suggestion in https://github.com/wakatime/vscode-wakatime/issues/180#issuecomment-832075272 but it didn't work:
[settings]
api_key = ...
standalone = false
alpha = true
# I've also tried like this:
standalone = false
alpha = true
[settings]
api_key = ...
None of this worked.
Should i move this to #180 and close this issue? Also, is there any logs I can provide?
The standalone
config option was removed in 17.0.0 and currently alpha
is the same as stable because wakatime-cli has no pending alpha releases, so you can remove both those config lines.
Let's leave this open since #180 is already closed. Does adding your api key to a ~/.wakatime.cfg
file in your container and your host machine make it stop prompting?
I don't think so. If I cat ~/.wakatime.cfg
from inside my container it shows my API key. And when I reload the VSCode it still asks for the key.
Oh, looks like this is related to #280?
Yeah, kinda related. Anyway, the suggestion seems to work. I added .vscode/devcontainer.json
with the following content:
{
"mounts": [
"source=${localEnv:HOME}/.wakatime.cfg,target=/home/dev/.wakatime.cfg,type=bind,consistency=delegated"
]
}
For future readers: mind the path at target=...
. It should be a path that makes sense in your container.
@alanhamlett thanks for the help 🤓
EDIT: after a few container restarts, VSCOde got back to prompting for the API key 😢 .
We would update the documentation for that scenario.
Actually... after executing docker compose down
and then docker compose up -d
, VSCode stills prompts me for the key.
I'm not getting request for a new one, but just error instead:
I have it set in my container's ~/wakatime.cfg
, manually:
Also, I added as a global in setting.json:
I run
I open vscode and it asks me for the key:
Is there a way to save it on my machine so that the wakatime extension can read it from inside even for a remote workspace? Or any other way.
By remote workspace I mean I'm using VSCode connected to a docker container using the Dev Containers extension. This container runs in my local machine