digitalocean / digitalocean/doctl
Access denied on ~/.kube/.lock
- Dominant language
- Go
- Stars
- 3.4k
- Forks
- 496
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
**Describe the Issue:**
While trying to generate a kube config using the latest snap, there is an access denied error:
> Error: open .lock: permission denied
even though the kube-config plug is connected by ` sudo snap connect doctl:kube-config` already
**Environment:**
- doctl version:
```
✔ ~/git/fork/doctl [master|✔]$ doctl version
doctl version 1.38.0-release
Git commit hash: 4cb8a21
```
- OS: elementaryOS 5.1
- Installation method: Snap
**Additional Details:**
```
✔ ~$ sudo snap connect doctl:kube-config
✔ ~$ doctl kubernetes cluster kubeconfig save rcluster
Notice: adding cluster credentials to kubeconfig file found in "/home/david/.kube/config-devel"
Notice: setting current-context to do-nyc3-rcluster
Warning: Using the doctl Snap? Grant access to the doctl:kube-config plug to use this command with: sudo snap connect doctl:kube-config
Error: open .lock: permission denied
```
Update:
I had $KUBECONFIG set to a non-existing file in my shell, when I cleaned that up it started working
```
✔ ~/.kube$ set|grep kube
KUBECONFIG=:/home/david/.kube/config-devel
✔ ~$ unset KUBECONFIG
✔ ~$ doctl kubernetes cluster config save rcluster
Notice: adding cluster credentials to kubeconfig file found in "/home/david/.kube/config"
Notice: setting current-context to do-nyc3-rcluster
✔ ~$
```
Contributor guide
Assessment
This issue has not been assessed yet.