Unable to generate password on GitHub Actions usin OP CLI tool

Community Member

I'm using OP CLI tool to generate passwords for automating the creation of .jks files for Android builds over GitHub Actions.
Locally I've created a script that is doing everything that is needed and it works flawlessly.
Command I'm executing: op item create --category=password --title="GeneratedPassword" --vault="Test" --generate-password='20,letters,digits'
This has been done locally on Ubuntu 20.04 LTS and GitHub Action is running the same version of OS.

Additionally, I've set the environment variable OP_DEBUG to true and only output after running above command I get is:
3:43PM | DEBUG | Skipped loading desktop app settings file. The desktop app might not be installed: read file: lstat /home/runner/.config/1Password/settings/settings.json: no such file or directory

Also, the OP_SECRET_KEY and OP_PASSWORD environment variables are defined on GitHub Action.

I don't know how to debug this issue as I don't get any valid output on why this has failed.

1Password Version: 2.7.3
Extension Version: Not Provided
OS Version: Ubuntu 22.04.1 LTS
Browser:_ Not Provided
Referrer: forum-search:github action create password


  • Nhat_NguyenNhat_Nguyen

    Team Member
    edited November 29

    Hello @adi9090,
    From your descriptions, it seems 1Password couldn’t authenticate your credentials in GitHub Actions.
    For more information, 1Password CLI works on your computer because it can connect with the desktop app for authentication, but for it to run in GitHub Actions, we will need some additional commands to add your account manually.
    That said, let us try these steps under jobs to see if it works. I am running the latest macOS, but you can use the steps here to install 1Password on Ubuntu.

          EMAIL: ${{ secrets.EMAIL }}
          SECRET_KEY: ${{ secrets.SECRET_KEY }}
          PASSWORD: ${{ secrets.PASSWORD }}
          - uses: actions/[email protected]
          - name: install 1password
            run: brew install --cask 1password/tap/1password-cli
          - name: start op
            run: |
              eval $(echo “$PASSWORD” | op account add --address my.1password.com --email “$EMAIL” --secret-key “$SECRET_KEY”)
              eval $(echo “$PASSWORD” | op signin)
              op item create --category=password --title=“GeneratedPassword” --vault=“Test” --generate-password=’20,letters,digits

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file