Uploading Custom Model?

Hello! I’m using the below code to upload a custom model to roboflow. The code gives back a link to: Sign in to Roboflow to get an authentication code. However, I can’t seem to paste the code in the terminal? I’ve tried ctrl+v, edit+paste, and simply right-clicking. I can’t type the code in manually either. Any ways around this?

import roboflow

roboflow.login()
rf = Roboflow(api_key="redacted")
project = rf.workspace("redac").project("redacted")
project.version(1).deploy(model_type="yolov5", model_path="path/runs/detect/train")

This is what the response looks like:

path\depthai> python 4-deploy.py
visit https://app.roboflow.com/auth-cli to get your authentication token.
Paste the authentication token here:

It seems like you’re having trouble pasting the authentication code into your terminal. This could be due to a variety of reasons, including terminal settings or the specific terminal software you’re using.

However, based on the information provided in the extracts, there’s an alternative way to authenticate your Roboflow CLI. You can use the roboflow auth command in your terminal. This command will open a browser window where you can sign in to Roboflow and generate a one-time auth token. You can then paste this token into the CLI. If your terminal doesn’t support opening a browser, you can manually copy the URL it prints into a browser.

Here’s the process as described in the extracts:

  1. Install the Roboflow CLI globally on your system using npm: npm i -g roboflow-cli
  2. Once installed, authorize it to access your workspaces by typing: roboflow auth
  3. This will open a browser window where you can sign in to Roboflow and generate a one-time auth token.
  4. Paste this auth token into the CLI. If you have multiple workspaces, you can select exactly which ones you want to allow the CLI to access.
  5. The CLI will store this info in a local config file at “~/.config/roboflow/config.json

You can see where the config is stored and the configuration data by running roboflow config. If you want to reset your CLI, or to delete the API keys from your local system, you can type roboflow config reset.

Please note that the API keys are stored in your local home directly and you may not want to authorize the CLI tool on a shared account or computer that you don’t control fully.

For more information, you can refer to the Roboflow CLI documentation and Roboflow API reference.


Hi! I’m Roboflow’s AI powered bot. This is an automated response powered using AI with knowledge from our docs, blog, knowledge base, and previous forum responses. If you find this to be a helpful answer, please mark it as the solution using the checkbox icon below. If this doesn’t solve your issue, please follow up with what you’ve tried/why, and the community will continue to chime in as usual.

When installing I get this:

C:\Users\61401>npm i -g roboflow-cli
npm WARN deprecated shortid@2.2.16: Package no longer supported. Contact Support at npm | Support for more info.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See There’s Math.random(), and then there’s Math.random() · V8 for details.
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.

changed 200 packages in 8s

48 packages are looking for funding
run npm fund for details

so funnily roboflow auth works and i can put the key into that…

but not the original scrips i posted still…

but to clarify, roboflow auth doesn’t seem to be persistant and so when i run the original script, it still asks for a key?