Cusor Agent login fails in redhat

Cursor Agent login failed in redhat. I have set CURSOR_USER_ID and CURSOR_API_KEY. still it fails

:warning: Warning: The provided API key is invalid.
The API key was loaded from the CURSOR_API_KEY environment variable.
Please check you have the right key, create a new one, or authenticate without it.

the api key is created using the dashboard .

Any help is appreciated.

Hi there!

We’re aware of an issue where the “The provided API key is invalid” error is shown for any connectivity issue, not just for invalid credentials. So your API key may actually be fine; the CLI just can’t reach our servers from inside the container.

Could you try running these two commands locally to help narrow down the issue?

1. Verify DNS resolution:

nslookup api2.cursor.sh

2. Test HTTPS connectivity:

curl -v https://api2.cursor.sh

If either of these fails, the issue is network-related rather than an API key problem.

HI Colin

Thanks for looking the problem.Both commands are successful.

Thanks for trying!

Where did you generate the API key from? It would be great if you could share a screenshot. :slight_smile: