Closed boxsnake closed 11 months ago
Are you in China? It seems to be a temporary problem. I can open https://api.github.com/repos/wakatime/wakatime-cli/releases/latest.
@gandarez Yes, I am in china.
I can not access https://github.com/repos/wakatime/wakatime-cli/releases/latest but https://github.com/wakatime/wakatime-cli/releases/latest is available, which redirects to the release page.
@alanhamlett any thoughts here? We should redirect China users to a different url maybe?
https://api.github.com/repos/wakatime/wakatime-cli/releases/latest redirects to https://github.com/repos/wakatime/wakatime-cli/releases/latest, as following:
However, https://api.github.com/wakatime/wakatime-cli/releases/latest redirects to https://github.com/wakatime/wakatime-cli/releases/tag/v1.85.2, as following:
I think this should be fetched as a JSON
, right? None of these is the correct routine, this is so weird.
@gandarez Can you offer a snapshot with how you can access https://api.github.com/repos/wakatime/wakatime-cli/releases/latest?
Thanks.
Due to GitHub API Doc, the GH Authorization bearer token is present. I am not sure if this affects.
A workaround:
wakatime-cli
from this repo's release$WAKATIME_HOME/.wakatime
wakatime-cli
(wakatime-cli.exe
in Windows) or symlink to it as wakatime-cli
Then everything will "seems" done. The only thing should be notice is that you may spend time to try updating and this updating process will finally fail.
Okay, I see.
It seems something wrong with my DNS resolving. It simply convert api.github.com
to github.com
.
Hmmm...
Trimmed debug logs in
idea.log
:The URL link fetching
wakatime-cli
ingetUrlAsString(https://api.github.com/repos/wakatime/wakatime-cli/releases/latest)
will redirect tohttps://api.github.com/repos/wakatime/wakatime-cli/releases/latest
, which gives a 404 in browser:Hence, the
wakatime-cli
is not downloaded to$WAKATIME_HOME\.wakatime