runpodctl config command fails on linux
Hello,
I am facing an issue configuring runpodctl on Ubuntu. When I run the command:
runpodctl config --apiKey <my_api_key>
I receive the following response:
Runpod config file not found, please run `runpodctl config` to create it
Error: error saving config: Config File ".runpod.yaml" Not Found in "[/root/.runpod /root]"
The command works fine on macOS, and I’m certain the API key is correct. It was working on Ubuntu as recently as September 6th 2024.
Hi, I think this is behaving as normal and it's just our error logs that are configured badly. A few releases ago, we changed the config file location and format from $HOME/.runpod.yaml to $HOME/.runpod/config.toml, with some logic for converting an existing .runpod.yaml to the config.toml for backwards compatibility.
Check to see if that new folder and file is present and has your api key in it. If so, you should be good to go! We will address the backwards compat message saying "error" even when nothing went wrong in the next release.
I confirm that /root/.runpod/config.toml file is created with my api key in it. But now, when I try to create pod
runpodctl create pod --gpuType 'NVIDIA GeForce RTX 4090' --imageName "runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04"
i am getting Error: Unauthorized and pod is not created. But the same command works on my mac with same api key perfectly
Ok, gotcha. I will try to test that. Thanks for reporting it!
I know the API key works on mac, but try with a fresh API key just in case. Are you on the latest runpodctl version, v1.14.4?
yes, I'm on the latest version of runpodctl. Api key is also fresh
Upd: I ran runpodctl config --apiKey <my_api_key> on github runners(I tried to set linux and macos machines and it failed in both cases). What is interesting is that I was not able to reproduce it locally(despite using same api key and latest runpodctl version in all cases).
runpodctl config --apiKey=$RUNPOD_API_KEY || true helped to fix this problem
Hello, I'm experiencing a similar issue when running runpodctl from within a RunPod pod. After executing:
runpodctl config --apiKey <my_api_key>
I got:
Configuration saved to file: /root/.runpod/config.toml
SSH key pair generated: /root/.runpod/ssh/RunPod-Key-Go (private), /root/.runpod/ssh/RunPod-Key-Go.pub (public)
Failed to add the SSH key: failed to get existing SSH keys: API error: Unauthorized
The image I used for RunPod pod is runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04.
I have verified that the API key is valid and has the correct permissions. The same commands work as expected on macOS. I also tried generating a fresh API key, but the issue persists on RunPod pod.
Any advice would be greatly appreciated. Thank you!
I'm getting the same issue as @yoshi12u