-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Description
rsconnect add -n localhost -s http://localhost:3939/ -k valid-api-key
Expected:
rsconnect content search -k invalid-api-key --title-contains "this returns nothing"
#> Error: Posit Connect reported an error (calling /__api__/v1/content): We couldn't log you in with the provided credentials. Please ask your administrator for assistance.
CONNECT_API_KEY=invalid-api-key rsconnect content search --title-contains "this returns nothing"
#> Error: Posit Connect reported an error (calling /__api__/v1/content): We couldn't log you in with the provided credentials. Please ask your administrator for assistance.
Actual:
rsconnect content search -k invalid-api-key --title-contains "this returns nothing"
#> []
CONNECT_API_KEY=invalid-api-key rsconnect content search --title-contains "this returns nothing"
#> []
The stored API key is being used even though the command-line / environment variable provides an overriding value.
rsconnect-python/rsconnect/api.py
Lines 862 to 869 in 50e6d51
# TODO: Is this logic backward? Seems like the provided value should override the stored value. | |
api_key = server_data.api_key or api_key | |
snowflake_connection_name = server_data.snowflake_connection_name or snowflake_connection_name | |
insecure = server_data.insecure or insecure | |
ca_data = server_data.ca_data or ca_data | |
account_name = server_data.account_name or account_name | |
token = server_data.token or token | |
secret = server_data.secret or secret |
Metadata
Metadata
Assignees
Labels
No labels