Hi there.
I’m using Doppler in Github Codespaces with great success, but I have a small question feature request.
Our current setup works like this. We have configured the DOPPLER_TOKEN
to a workplace_service_account key. This is great, because this means that when freelancers use the codespace they have access to test and local environment in Doppler, everything is fine.
Hoewever, when I as a “real” doppler user uses a github codespace and run doppler login
, I can successfully log in. But after logging in, I’m still “authenticated” as “workplace_service_account” (and thus can’t access stage for example).
Can you help with this, or come with any tips? I’m using v3.68.0
Hi @alexbjorlig!
This is because having DOPPLER_TOKEN
set in the environment takes precedence over the CLI token that’s set when you perform a doppler login
. There are two things you could do in this scenario. Either:
- Run
unset DOPPLER_TOKEN
in your shell before you do a doppler login
. That should get your shell session to use the CLI token.
- Run
doppler login
and then run export DOPPLER_TOKEN=$(doppler configure get token --plain)
, which will reassign the DOPPLER_TOKEN
environment variable to the new CLI token you got after performing a CLI login.
Ultimately, it might be easier to have a separate Service Account for your more privileged developers that has the additional access permissions and then set things up so their Codespaces get a token from that Service Account injected and then your freelancers get a token from the Service Account with fewer permissions injected (assuming this is possible with your setup!).
Regards,
-Joel