Gitlab CI - Auth errors

Hello everyone, I hope you all are having a wonderful saturday!

I’m trying to publish to my staging channel from the gitlab CI, here is how my yml looks like:

---
image: node:alpine
cache:
  key: ${CI_COMMIT_REF_SLUG}
  paths:
    - ~/.npm
    - .jest
stages:
  - test
  - deploy
before_script:
  - apk add git
  - apk add python3
  - apk add make
  - npm ci
jest-tests:
  stage: test
  script:
    - apk add bash
    - npx jest --ci
expo-deployments:
  stage: deploy
  script:
    - npx expo login --non-interactive -u lipe-dev
    - npx expo build:android --release-channel staging --non-interactive

The Jest part works fine, but when I try to expo I get this:

$ npx expo login --non-interactive -u lipe-dev
[16:07:19] Username and password not provided in non-interactive mode. Set the EXPO_CLI_PASSWORD environment variable if you don't want to pass in passwords through the command line.` ` ERROR: Job failed: exit code 1

I have the EXPO_CLI_PASSWORD variable set on gitlab’s CI/CD config page.
I also tried it like this:

npx expo login -u $EXPO_USERNAME -p $EXPO_PASSWORD

With both env variables also set on the gitlab CI CD page, but I got the same errors. Am I doing something wrong? The only alternative I’m seeing right now is to put my password on -p but I really don’t wanna do that…

I found the issue, I had those variables as protected on gitlab CI CD config… It works now.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.