Juju via Continous Desployment requires login?

I am utilizing gitlab CICD and a shell executor to talk to my juju controller on a piece of hardware I own and control… I noticed after a while that sometimes when I go to execute commands it fails and gives this

$ juju add-model "${CI_PROJECT_NAME}-$SAFE_BRANCH_NAME-${CI_CONCURRENT_ID}" || true
please enter password for gitlab-runner on localhost-localhost: 
ERROR opening API connection: cannot get discharge from "https://123.456.777.10:17070/auth": EOF
Cleaning up project directory and file based variables

I went ahead and manually SSH’d into the box and logged into as the user… tested by just doing

juju deploy test

suddenly there’s no issue… and the model is created… I go back to the CICD and that now succeeds too!? I am guessing there is some sort of token being refreshed…? but how can I keep this refreshed without manually SSHing in and doing a one-off command via SSH? do I

juju login -u gitlab-runner 

and somehow feed the password via CICD ?


After even just minutes… seems the macaroon is lost and I cannot do anything… I might end up just reinstalling everything from scratch but put the admin on gitlab-runner user … instead of fiddling with users in juju