gridscale / gscloud

The official command-line interface for the gridscale API
https://gridscale.io/
MIT License
16 stars 8 forks source link

Error while proxying request: getting credentials: exec: executable gscloud.exe failed with exit code 1 #140

Closed joejoe87577 closed 8 months ago

joejoe87577 commented 2 years ago

I'm running into an issue with file access when trying to use the gscould util after my system has been in hibernation mode for some time (usually 1-2 days).

kubectl version: 1.22.5 gscloud version: 0.11.0 (Git commit: 4ccd023bafe07d9849c71fa850264d79e7a14488) go version: go1.16.12 OS: Windows 11 Build 22000.556

When trying to use kubectl with kubectl get namespaces I get the following error message:

Could not load cached kubeconfig: remove C:\Users\USERNAME\AppData\Local\gscloud\exec-credential\41e65f36-059d-4a14-93c8-c2fb29e490fc.json: The process cannot access the file because it is being used by another process.

Using the same version of the gscloud in the WSL2 and the utility works fine.

As a workaround I can delete the file and then reconnect using kubectl get namespaces and everything works as expected. Using the process explorer I couldn't find a process accessing the file.

nvthongswansea commented 2 years ago

@joejoe87577 Thank you for reporting. We will take a look.