runpodctl icon indicating copy to clipboard operation
runpodctl copied to clipboard

runpodctl config command fails on linux

Open VitalikLev opened this issue 1 year ago • 7 comments

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.

VitalikLev avatar Sep 11 '24 10:09 VitalikLev

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.

DireLines avatar Sep 11 '24 14:09 DireLines

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

VitalikLev avatar Sep 11 '24 15:09 VitalikLev

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?

DireLines avatar Sep 11 '24 15:09 DireLines

yes, I'm on the latest version of runpodctl. Api key is also fresh

VitalikLev avatar Sep 11 '24 15:09 VitalikLev

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

VitalikLev avatar Sep 13 '24 09:09 VitalikLev

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!

yoshi12u avatar Mar 02 '25 12:03 yoshi12u

I'm getting the same issue as @yoshi12u

aidando73 avatar Mar 22 '25 10:03 aidando73