Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication with $APOLLO_KEY doesn't work if there is no default profile #514

Closed
EverlastingBugstopper opened this issue May 6, 2021 · 0 comments · Fixed by #516
Closed
Labels
Milestone

Comments

@EverlastingBugstopper
Copy link
Contributor

EverlastingBugstopper commented May 6, 2021

Reproduction that won't leave your config in a broken state, you should be able to copy paste this command and see the error message

APOLLO_PROFILE=$HOME/.config/rover/profiles/default && \
APOLLO_PROFILE_TMP="$APOLLO_PROFILE"_tmp && \
APOLLO_KEY=$(cat $APOLLO_PROFILE/.sensitive | cut -d'"' -f 2) && \
mv $APOLLO_PROFILE $APOLLO_PROFILE_TMP && \
rover config whoami
Checking identity of your API key against the registry.
error: There is no profile named "default".
        Try running `rover config list` to see the possible values for the `--profile` argument.
mv $APOLLO_PROFILE_TMP $APOLLO_PROFILE
$ rover config whoami
Checking identity of your API key against the registry.
Key Type: USER
User ID: gh.EverlastingBugstopper
Origin: $APOLLO_KEY
API Key: user*************************************************

The problem is that it's attempting to read the default profile from the file system even in the case where $APOLLO_KEY is present.

This problem seems to be limited only to rover config whoami, configuring any other command with just an API key works just fine.

@EverlastingBugstopper EverlastingBugstopper added bug 🐞 triage issues and PRs that need to be triaged labels May 6, 2021
@EverlastingBugstopper EverlastingBugstopper added this to the May 11 - GA milestone May 6, 2021
@abernix abernix removed the triage issues and PRs that need to be triaged label Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants