I can't login to Roboflow CLI

I have installed the Roboflow Python package, and typed “roboflow login” in the terminal. The link for my authentication token pops up, but for some reason the terminal simply doesn’t let me write anything. I can’t type manually or paste it.

Anyway, I then just wrote “roboflow.login()” in my Python code, and this time I could paste the authentication token, only to find

[Errno 13] Permission denied: ‘/Users/miketsoi/.config/roboflow’

I think it is trying to save my credentials in that location, how do I give it permission?

Also, can someone confirm that I really need to complete this step (logging in) in order to use the Roboflow Python package?

Error with “roboflow.login()”:

Update: I have resolved the “nothing I type appears” issue. It turned out my Mac was just hiding what I was typing, but I was still typing stuff.

So now, both ways, “roboflow login” in the Terminal or “roboflow.login()” in my code both lead to the same permission error.

From Stack Overflow, I have read that the permission error usually means that Python is trying to open a folder as a file, and I think it applies here.

After providing the authentication token, the credentials are saved in the disk at ~/.config/roboflow/config.json. From the error message, I see that Python is trying to open ~/.config/roboflow (without the “config.json”).

Does anyone know how I can manipulate Python to open “config.json” rather than the “Roboflow” folder?

Alternatively, am I doing something wrong? I didn’t think the software would be so complicated!

Hi @Mike_Tsoi ,

Thanks for reporting this issue!

I’m on Mac myself and have no problems when running roboflow login.

For starters - can you run below code:

docker run -it --rm --entrypoint /bin/bash python:3.12-slim
pip install roboflow
roboflow login

When you issue roboflow login you are asked to visit https://app.roboflow.com/auth-cli, please copy the token and paste it in the terminal and hit <enter>

If this works please type exit to exit the container and then please confirm the ownership of ~/.config on your host system (i.e. whoami; ls -lah ~/.config)?

Hope this helps,
Grzegorz

Hi @Grzegorz,

Thank you for your reply, I found a way to bypass the issue and now I’m just rolling with that.

Interestingly, one day I decided to test whether I could just run Roboflow without a “successful” login. The below worked:

rf = roboflow.Roboflow(“API KEY”),
project = rf.workspace().project(“PROJECT_ID”),
model = project.version(“PROJECT VERSION NUMBER”).model.

To this day, I still don’t know what happened and whether I needed to use “roboflow login” or not haha.

Hi @Mike_Tsoi ,

Thanks for sharing!
I’d be very interested to learn what was the way to bypass the issue :slight_smile:

Thanks again,
Grzegorz

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.